Android Facebook SDK: generate release key hash

You followed the steps that facebook provides for the creation of a login application?

You need a ‘Production keyhash’ obtained starting your release keystore:

From comand line:

keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64

And add this key on facebook app page options.

More information: https://developers.facebook.com/docs/android/getting-started/

I find a solution. for MAC

Use this one to get YOUR_RELEASE_KEY_ALIAS:

keytool -list -keystore /Users/***/Documents/keystore/***.jks

and this one to get your release keyhash:

keytool -exportcert -alias YOUR_RELEASE_KEY_ALIAS -keystore /Users/***/Documents/keystore/***.jks | openssl sha1 -binary | openssl base64

It works for me.

The simplest solution.

1) Sign your Apk.

2) Connect your device to machine and Install signed apk on real device.

3) When facebook login is pressed, you will get an error saying “Invalid key hash. The key hash “xxx” does not match any stored key. …” on your logcat.

4)Copy the logcat Hash Key and put this key to developers.facebook.com/apps/104…../settings/

Leave a Comment