hesham shawky
hesham shawky

Reputation: 1151

ionic invalid key hash facebook does not match any stored

I'm trying to use facebook login it works really well on the browser but on the mobile device ( android ) I get this message

invalid key hash. the key hash XXXXXXXXXXXXXX doesn't match any stored keys hashes. configure your app key hashes at https://developer.facebook.com/apps/xxxxxxxxx

I'm sure that I have put the right hash ( I guess ) I did it with those 2 command lines.

( On Windows Machine )

First cd to OpenSSL directory

cd C:/openssl/bin

Second:

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

I took the key from the console and put it on the facebook developer dashboard android platform!

And I get the above error whatever key I generate!

Upvotes: 1

Views: 421

Answers (1)

Balvinder Singh
Balvinder Singh

Reputation: 580

You can get facebook hash key by using your system SHA1 fingerprint. Some times we need to use 2 hash keys for android. One is for the device which doesn't have the Facebook app (this you can get using SHA1) and second will be for devices that have facebook app installed. For this, you have to enter the key displayed on the device during the Facebook login error in the app.

Upvotes: 0

Related Questions