-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facebook android does not call callback function upon login #29
Comments
Perhaps a follow up on this with an isolated example: I get the same problem with the sample "Simple" application. I work with cordova 2.1.0 so according to the docs it should work. It appears that the FB.login() callback function is never called. I see the "will login" console.log, but not the "RESPONSE" console.log when the app uses the native FB app to connect on the system. Any help would be wonderful. For the sake of reference I have pasted the code below. Naturally I have replaced the appid with myappid here, please replace it with yours.
|
I had this same problem (callback not being triggered) when trying to login using the Facebook app. In my case the problem was the key hash I've generated with Java's keytool (I was using a wrong version of openssl). I used the instructions in this link to generate the correct key hash: http://stackoverflow.com/a/6665263 |
I have a strange error with your plugin, the biggest problem being there are not errors generated.
The situation is as follows:
The other odd thing is that the code I use works on iOS in both cases.
The code I use:
FB.login(
function(response) { console.log("RESPONSE FROM LOGIN");
if (response.authResponse) {
// some code here
} else {
alert('An error has occurred');
}
},
{ scope: "email" }
);
before this I call:
FB.init({ appId: myappid, status: true,
cookie: true,
xfbml: true,
oauth: true,
nativeInterface: CDV.FB,
useCachedDialogs: false
});
The logger returns:
03-12 22:51:28.470: D/CordovaLog(21023): Cordova Facebook Connect plugin initialized successfully.
03-12 22:51:28.470: D/CordovaLog(21023): : Line 1192040477 : Cordova Facebook Connect plugin initialized successfully.
All I get from the moment I call the FB.login() function until it returns me to the app is:
03-12 22:58:45.170: D/DroidGap(21023): Paused the application!
03-12 22:58:45.170: D/CordovaWebView(21023): Handle the pause
03-12 22:58:45.170: D/CordovaWebView(21023): >>> loadUrlNow()
03-12 22:58:47.115: D/dalvikvm(21023): GC_CONCURRENT freed 349K, 50% free 3206K/6407K, external 408K/892K, paused 2ms+8ms
03-12 22:58:47.175: D/CLIPBOARD(21023): Hide Clipboard dialog at Starting input: finished by someone else... !
03-12 22:58:49.715: D/DroidGap(21023): Resuming the App
03-12 22:58:49.715: D/CordovaWebView(21023): >>> loadUrlNow()
I'm really puzzled with this issue as it does work in the web view and on iOS; I would like to keep the source the same for iOS and android so I hope someone can help me resolve this issue.
Thanks!
The text was updated successfully, but these errors were encountered: