3
votes

The Facebook error message is : Invalid key hash. The key hash xxxxxxx= does not match any stored key hashes...

I know this issue has been already treated but i still have the problem. I wrote below the detailled process but i should have miss something. Please help.

I am working on windows 10/Cordova/android.

  1. Open cmd window as adminstrator
  2. npm update -g cordova
  3. cordova platform update android
  4. cd platforms\android\build\outputs\apk; rm *.apk
  5. keytool -genkey -v -keystore myapp.keystore -alias myappalias-keyalg RSA -keysize 2048 -validity 10000
  6. cordova build android –release
  7. Create platforms\android\release-signing.properties file including:

    storeType=jks
    keyAlias=myappalias
    keyPassword=mypass
    storePassword=mypass
    
  8. remove the app from the android-smartphone

  9. cordova run android –release

The key hash i cut& paste in the facebook field is given by the command:

keytool -exportcert -list -v -alias myappalias -keystore myapp.keystore | openssl sha1 -binary | openssl base64

It includes the sign =

Any Idea ?

2
When i insert the invalid key hash displayed by the facebook error message in the facebook field for the hash key it works. But how can i get it ??? - alvaro562003

2 Answers

0
votes

Try this:

keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64
0
votes

You can also use this.

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