Well, that’s a famerous issue in stackoverflow, story is:
- Android developers use their own keystore to sign APK
- And generate a key hash value to facebook APP, so that facebook will sure that’s their own android APP calling their own facebook APP.
And, may developers found the key hash they generated in Windows was wrong, they’ll get an “Invalid_Key” error message…and they have to install something like Cygwin…
In my case, I put my own keystore into 3 OS
- Windows7 x64
- Mac OSX 10.6.8
- Ubuntu 10.04
And using following command to generate key hash:
keytool -exportcert -alias mykey -keystore ./mykey.keystore | openssl sha1 -binary | openssl base64
All 3 OS generate totally different key hash value…!
So I was confused, it can’t be, must be something wrong…
After several hours try & error, and STFW, I found that was because a wrong alias value given.
Now, just see what alias name of your keystore shows in Eclipse IDE, and use right alias value to generate key hash value again.
Now, 3 OS genetated same key hash value~
and my Android APP calls facebook API just well…