Android Facebook SDK : "(# 404) Keyhash XXXXXX does not match any stored key hashes"
After spending few hours and referring few answers here. finally its worked for me. few observations:
- hashcode generated by Keytool is not same as hashcode showing in exception. Use the later one.
- For Facebook Sample apps we need to add the hash for SampleApp.Here if we entered the hash and click on SaveChanges its clearing and not saved.So before clicking the SaveChanges need to hit the enter key and make sure its not clearing.
- need to append = at the end of hashkey shown in exception.
Assuming that you know how to create a hash key, I suggest you to follow the below steps to add a hash key in FaceBook
developer console of your app,
1. After creating a app, click on settings from the left side panel.
2. Select add platform.
3. From the pop up, select Android as your platform.
4. There you will find fields to enter Package Name, Class Name, and hash Keys.
5. Fill up the respective fields.You can enter many hash keys as well.
Note : If you enter wrong hash key, then it will show you the same error again.
hope it helps.