Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android app Key Hash doesn't match any stored key hashes

I have an application on production on Play Store which uses a login with the Facebook SDK. When I debug the application from Eclipse there is no problem, but when its on production it gives me the following error after Facebook asks me for the permissions. I have added on my app page on developers.facebook.com the key hash generated with keytool using this command:

keytool -exportcert -alias diego -keystore "C:\Users\Diego\Desktop\CeluChat.KeyStore" | "C:\openssl\bin\openssl.exe" sha1 -binary | "C:\openssl\bin\openssl.exe" base64

CeluChat.KeyStore is the keystore I used when I exported the signed application, and when keytool promts me for the password, I entered the same when exported.

But the error that gives me on production (downloaded from Play Store) is:

10-20 22:21:10.752: W/fb4a(:):BlueServiceQueue(5872): com.facebook.http.protocol.ApiException: Key hash VQ3XhZb5_tBH9oGe2WW32DDdNS0 does not match any stored key hashes.

The Key Hash that is on the exception is different from the key hash generated with keytool. Anyway I added the Key Hash on Facebook, but it is still not working.

like image 913
Diego Avatar asked Oct 21 '13 01:10

Diego


People also ask

What is Android key hash?

The key hash is a machine specific security check for authenticity. If you use multiple machines for development of the application, you need to add and save multiple key hash to your profile to authenticate every machine.


Video Answer


1 Answers

Facebook some how replaces +,- and / with _

So just try replacing _ with +, - and / and add that hash-key.

Hopefully it should work.

like image 191
Veer Avatar answered Oct 02 '22 15:10

Veer