Android, Facebook SDK and Single Sign On: Either my App fails with "invalid_key" or Facebook App fails
In November 2010 Facebook introduced Single-Sign-On for And开发者_开发问答roid-Applications. Supposedly you can just login into your Facebook-App, and dont need to login again in your other applications, if you connect with Facebook-Login. However I experienced, that one of the Applications, either the Facebook-App, or my App fails with the login.
If the Facebook-App is installed, and I'm logged in, I cant log into my onw App, but instead get an error
"invalid_key"
If on the other hand, I first install my app, I'm logged into my App with Facebook-Login, and afterwards I install the Facebook App and try to logon their, the Facebook App fails and I cant login. Others seem to have the same issue: https://github.com/facebook/facebook-android-sdk/issues/closed#issue/140
Is there anybody out there you ran into the same issue and solved it?
This issue could be because of a number of reasons, most related to the wrong key-hash. I have answered a similar question here.
Are the set of permissions same in both the application?
This may or may not work for you, but OS X, Eclipse and running keytool -exportcert -alias androiddebugkey -keystore /Users/eosgood/.android/debug.keystore | openssl sha1 -binary | openssl base64
and Enter keystore password: 'android' worked for me. if the pass isnt android, it failed. Hopefully this helps, this problem is a tough one.
Thanks to facebook, now its giving key itself along with invalid_key exception. Use that value and update in app settings. I am using windows 7 64 bit machine and for me the key doesn't have =(equal to) in the end but it worked cleanly.
精彩评论