Facebook not working with Exported/Signed APK File
You are correct on the key hash's being different from the debug.keystore and the release signing key. To remedy that, follow the steps on this website here: http://www.helloandroid.com/tutorials/using-facebook-sdk-android-development-part-1
It has a nice tutorial that will fix the issue in almost no time.
The gist of it is:
- Download OpenSSl for Windows and extract the .zip to a simple location like: c:\openssl with all the contents of the zip extracted in this folder's root.
- Copy your signing key file to your JRE installation's bin folder. For example, in my case:
C:\Program Files\Java\jre7\bin
- While in the bin folder where you copied the signing key, Press SHIFT+ Right Click -> Open command window here.
- Run this command: keytool -exportcert -alias YOUR_ALIAS -keystore YOUR_SIGNING_KEY > c:\openssl\bin\debug.txt
- Enter your password for the signing key
- Now, navigate to the c:\openssl\bin folder and type in the following commands:
openssl sha1 -binary debug.txt > debug_sha.txt
And then,
openssl base64 -in debug_sha.txt > debug_base64.txt
Done! The debug_base64.txt contains your Key Hash. Copy this in your app console and you are all set.
This sounds lengthy, but you really will be done in literally 4 - 5 minutes. ;-)