0

I am using following command to generate my has key.

keytool -exportcert -alias <ALIAS> -keystore <PATH TO KEYSTORE> | "F:\api\openssl\bin\openssl.exe" sha1 -binary | "F:\api\openssl\bin\openssl.exe" base64

both the ALIAS and PATH TO KEYSTORE are same as the ones i use while exporting my application. Also the password I give is also the same i use while exporting my app.

I have properly updated the key on facebook on both dev n release options.

How ever when i try to share from my app it shows me a Toast containing following error:

(#404)Key hash <A COMPLETELY NEW HASH> does not match any stored key hashes.

Can anybody help me.

chandings
  • 549
  • 3
  • 9
  • 23

2 Answers2

0

It generally means the app Id of that app you are using that doesn't have same hash key that you are using.... my solution would be

1.Create completely new app on Facebook and get new app id.

2.Generate hash key properly with your own debug.keystore file and put it into Facebook app

I was facing the same issue after doing this i got rid from (#404)Key hash does not match any stored key hashes.

akash yadav
  • 349
  • 4
  • 14
  • my app is already released on play store. I am trying to add facebook features now. So I do not wanna use debug.keystore. I really find it inefficient way to create and new Facebook app all together. What happens if i get same error after i release my facebook app, just create another one. More over I am very sure if i just add the key shown in #404 error i think it will start working. My primary concern is what i am doing wrong that i do not get the same #key as the app should. – chandings Oct 06 '14 at 05:22
  • You wont get same error the possibility is less until some doesn't change on your Facebook app. see the problem only is mismatch and i can not exactly tell you where you have mistaken either on creating hashkey or putting it on to facebook app..so i generally told you the solution to get rid of it. – akash yadav Oct 06 '14 at 05:27
  • but if i am not changing my keystore then idially the hash should not change either? Also what do i do if tomorrow I need to update my app again? I am not trying to be sarcastic but these are very genuine concerns. What is it that I am doing wrong? – chandings Oct 06 '14 at 05:31
0

I might be repeating things you already know, but you need to add multiple key hashes to your app settings if you're doing development and release.

In general, when you're exporting your app (to put on the Play Store, for example), you're using the release keystore, whereas when you're doing development (building from IntelliJ or Android Studio), you're using the debug keystore. You need to put the key hash from both of these keystores in your app settings.

Ming Li
  • 15,672
  • 3
  • 37
  • 35