Facebook key hash does not match any stored key hashes
I'm really having troubles with the Facebook hash key. I generated it in my Eclipse.. proof:
Then I went to https://developers.facebook.com/ and registered a new app.
And finally I've set my hashkey at the settings of Facebook developers:
But no whatter I do I keep getting the same error log: "Key hash B5dWUEYfZJL/...........jyA= does not match any stored key hashes"
Does anybody know what I did wrong or how I can fix this problem? If I used the id and name from the HelloFacebookSample inside my own app everything works. So it HAS to do with the key hash, id or name I've set somewhere most likely..
Thank you, Yenthe
Solution 1:
If your login is working without installing facebook app and not working when facebook app is installed due to error "hash key has not match" then do following steps
1 ) Launch your app and try to log in with facebook. A dialog will open and tell you: "the key has not been found in the facebook developer console and also show the hash key.
2 ) Note down that hash key.
3 ) Put it into your facebook developer console where you first generated your api key and remove the hash key with new and save. Now you are done. Anyone that downloads your app, published with earlier used keystore can log into facebook.
Solution 2:
DATE UPDATED EVERY TIME I GOT UPVOTE AS I KNOW IT IS STILL VALID
DATE: 27/01/2022 (27th of Jan 2022)
This is how I solved this problem
- I have got the SHA1 from
signingReport
(found in gradle-->app/Tasks/android/signingReport)
Copy the SHA1 value to your clipboard
like this XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
-
Facebook sdk
requires it to be in base64 hash key so we open http://tomeko.net/online_tools/hex_to_base64.php
to convert your SHA1 value to base64.
This is what Facebook requires get the generated hash " ********************= "
-
open
https://developers.facebook.com/
-
select your project in the setting tab, basic/Key Hashes add the generated key.
-
don't forget to save changes.
Solution 3:
After hours of trying I've finally found a solution.
- Delete any app on the website of Facebook (developers.facebook.com)
- Delete the file debug.keystore under
C:\Users\yourUserName\.android
- Generate a new key (by running your app again)
- Create a new app on developers.facebook.com and add the new hash key
- Re-run your app
- Succes!