Invalid Key Hash

Hello,

From the following keytool utility

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

I got a key hash which I have added and saved in my developer profile settings on Facebook.

After building and testing Facebook in my app, I am getting error:

“Invalid Key Hash” (with some other key hash) which is not matching with added key hash.

So I added that prompted keyhash in developer profile settings to check whether it is working or not. But still getting the same error.

Please provide me some solution for this.

Thanks in advance.

Hi @sandeep.mahajan,

May you please follow the instructions in the “App Integration > Android” section of this guide?

http://docs.coronalabs.com/guide/social/setupFacebook/index.html#android

Thank you,

Brent Sorrentino

I have found that you need to add an = to the end of the hash key that is shown in the error message.

I also found this free tool useful too - worth a try:  (for me it generated a different key to the one shown when the facebook page loads - it was this key that worked for me and not the one from the tool)

I suspect the tool is useful for when going live

http://stackoverflow.com/a/17732453/3781891

~/.android/debug.keystore is not the debug key that Corona SDK uses.  It’s in the CoronaSDK/Resource Library/Android/debug.keystore.  If you build with the debug keystore provided with Corona SDK then you have to generate your keyhash against it.

Rob

Hi @sandeep.mahajan,

May you please follow the instructions in the “App Integration > Android” section of this guide?

http://docs.coronalabs.com/guide/social/setupFacebook/index.html#android

Thank you,

Brent Sorrentino

I have found that you need to add an = to the end of the hash key that is shown in the error message.

I also found this free tool useful too - worth a try:  (for me it generated a different key to the one shown when the facebook page loads - it was this key that worked for me and not the one from the tool)

I suspect the tool is useful for when going live

http://stackoverflow.com/a/17732453/3781891

~/.android/debug.keystore is not the debug key that Corona SDK uses.  It’s in the CoronaSDK/Resource Library/Android/debug.keystore.  If you build with the debug keystore provided with Corona SDK then you have to generate your keyhash against it.

Rob