Hello I've a problem with the phonegab facebook plugin, the FB.login seems to work correctly with Facebook App installed, it ask me to authorize my app, but after my confirmation to the question it not call my callback function and seems to freeze. I've this log in the console
07-12 14:29:41.742: D/DroidGap(10814): Incoming Result
07-12 14:29:41.742: D/DroidGap(10814): Request code = 64206
07-12 14:29:41.742: D/DroidGap(10814): We have a callback to send this result to
07-12 14:29:41.750: D/DroidGap(10814): Resuming the App
I'm using cordova 2.7.0 and the last version of plugin. I follow the step from the facebook documentation, the same procedure in iOS work correctly. This is my FB.Login code:
FB.init({ appId: "123074627XXXXX", nativeInterface: CDV.FB, useCachedDialogs: false });
console.Log('1');
FB.login(function(response) {
console.log('2');
FB.api('/me', function(response) {
………..
});
}, {scope : 'email'});
the console prints 1 but not the second (2);
could you help me?
Put this:
Log.e("Facebook login error",state.toString());
on your ConnectPlugin.java, just like this:
openRequest.setCallback(new Session.StatusCallback() {
@Override
public void call(Session session,
SessionState state,
Exception exception) {
Log.e("Facebook login error",state.toString());
onSessionStateChange(state, exception);
}
});
This will show you the facebook error (maybe "CLOSED_LOGIN_FAILED").
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With