mgcrea / cordova-facebook-connect

Cordova ARC plugin for the Facebook SDK
94 stars 43 forks source link

Login call failing - The operation couldn’t be completed. (com.facebook.sdk error 5.) #22

Open nathanjamal opened 11 years ago

nathanjamal commented 11 years ago

I know a few other people have seen the error from time to time and then it disappears, but mine seems to be stuck.

3 days ago i removed my fb app from my fb account. Then when trying to connect again, in the exact same way i have been doing for months, i get an error from the login call

    
    var FBPlugin = window.plugins.facebookConnect;

        FBPlugin.login({permissions: ["email","user_likes","friends_likes","publish_actions"], appId: appId}, function(result) {
               console.log(result);
        }); 
The operation couldn’t be completed. (com.facebook.sdk error 5.) 

Even though i removed my app from my account when i call

                        FB.initWithAppId(appId,function(result){
                             console.log(result);
                        });

i get returned an object with my appId and a accessToken that doesn't expire until next year??

{"expirationDate":"2013-01-31T21:57:03+0000","appId":"APPID HERE","accessToken":"ACCESS TOKEN HERE"}

Any idea whats going on here?

Thanks in advance,

Nathan

MaKleSoft commented 11 years ago

Had the same problem lately. Apparently since the latest facebook update you cannot request publishing permissions when initially logging in the user. Leave out the 'publish_actions' permission and you should be fine. You can request it later when you actually need it the first time. Also, just to be safe, reinstall the app.

alondo1234 commented 9 years ago

Hi, I have the same problem. However i try to login as an admin. Shouldn't i have permissions anyway on facebook?