Wizcorp / phonegap-facebook-plugin

The official plugin for Facebook in Apache Cordova/PhoneGap
Other
1.91k stars 2k forks source link

Graph API call works on Android but not on iOS #1317

Open Andr3a988 opened 8 years ago

Andr3a988 commented 8 years ago

I am calling the graph API and everything is ok with Android, with ios instead it works only if I order id,name and gender, returning the following error: "The operation couldn’t be completed. (com.facebook.sdk error 5.)". I use the plugin as follows: First I make the login:

     facebookConnectPlugin.login(["public_profile", "email", "user_birthday"],
             fbLoginSuccess,
             fbLoginFailure
        );

and this is ok both ios that Android, then inside the function fbLoginSuccess I use:

    facebookConnectPlugin.api("/me?fields=id,name, email, birthday, picture, gender", 
             ["public_profile"], 
             function (result) { }, 
             function (error) { }
     );

and this works only on android, instead on ios returns the above error; As already mentioned on ios it works only if I order id,name and gender without email, birthday and picture. Who can help me? Thanks