I have an issue with SSO using the Facebook SDK for Android. The problem occurs only when the native Facebook application is installed. When it’s not installed, everything works fine, specifically:
Facebook facebook = new Facebook(APP_ID);
facebook.authorize(mActivity, , new DialogListener() {
...
});
facebook.isSessionValid(); // returns true
But when the native application is installed, facebook.isSessionValid() still returns false despite the fact that I called the authorize method.
I should add that I created an native Android based Facebook application with the hashkey generated from my debug certificate using keytool.
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
What is going on?
SOLVED! 🙂
I sure hope this will work for you as well.
The problem is that Windows generates an invalid key.
Run this with your app:
Don’t forget to get Base64 (http://iharder.sourceforge.net/current/java/base64/).
The generated key is on your logcat, replace the old one with this.
Solution thanks to:
http://p-xr.com/implementing-facebook-into-your-app-invalid-key-with-keytool/