I'm having a very annoying problem using Facebook's sign-on. It works perfectly fine when running on an emulator, but when trying to use it on an actual device causes the following to happen: I see the facebook page loading, for a few seconds, and then nothing.
_facebook = new Facebook(Common.APP_ID);
_facebook.authorize(this, new DialogListener() {
@Override
public void onComplete(Bundle values) {
try {
JSONObject json = new JSONObject(_facebook.request("me"));
String id = json.getString("id");
String token = _facebook.getAccessToken();
Log.w("facebook", id);
Log.w("facebook", token);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Override
public void onFacebookError(FacebookError error) {
Log.w("facebook", "onFacebookError");
}
@Override
public void onError(DialogError e) {
Log.w("facebook", "onError");
}
@Override
public void onCancel() {
Log.w("facebook", "onCancel");
}
});
I get no logs saying anything is wrong, it does not stop at any of the onError
methods, nothing. Just carries on as usual.
I've followed everything written online, I've added the native app ID gotten using the keytool to the app page, and still - NADA.
Any help (even a workaround) would be greatly appriciated! Thanks