Sunday, 15 March 2015

android - Cordova/Phonegap facebook plugin An active access token must be used to query information -


I'm using my Cordova Android app to connect to Facebook.
I can login with:
FacebookConnectPlugin.login (["email"], fbLoginSuccess, function (error) {warning ("Error:" + JSON.stringify (error));} ); , call logout also facebookConnectPlugin.getLoginStatus and receive:

  • User ID
  • AccessToken
  • ends
  • SIG
  • Position

But when FB.api ('/ me', the function (response) {... }} is called, I should be using an active access token to type information about the current user, type: OAuthException, code: 2500}} {error: {message: / Code>
This only happens when The app has been created, not tested in the browser.

Manually FB.api with a token call:

Code> FB.api ('/ me? Access_token =' + userdata.authResponse.accessToken, function (feedback) {... where userdata facebookConnectPlugin.getLoginStatus < / Code>
I do not understand why it does not automatically do it in the Android app as it does in the browser.


No comments:

Post a Comment