Ionic Native Facebook - Token work on client but not in php


The plugin Ionic Native Facebook work well at client side :

  • authentification
  • get profil
  • get friends
  • the session stay active 60 days

When I try to use this “accessToken” in php, the framework (facebook/graph-sdk) said me this :

  • Invalid appsecret_proof provided in the API argument

I have verifiy the app_id, app_name, app_secret is same at client/server.

My script php work well if I use a “accessToken” generated by the “graph explorer”.
My script php doesn’t work if I use the accessToken generated by “ionic native facebook”

Where is my mistake ?
Is the client accessToken can’t be used at server side ?

Thanks for your help,

Solved !

The prob is the fake compilation "ionic cordova build android"
If you change the app_id and app_secret (for example to pass of “test app” to “prod app”), the client app continue to use the first app references. So the token is wrong for php who use the good app_id and app_secret.

To solve it u need to “ionic cordova platform remove android” and “ionic cordova platform add android”