t0s
t0s

Reputation: 1221

Android facebook : invalid key. Android key mismatch

When i used the simple facebook login for Android which i made a few days ago i didn't have this prolbem.

Now when i run the app i get an "invalid key" - "Android key mismatch"

06-07 02:08:51.104: W/GET_MESSAGE(273): invalid_key:Android key mismatch. Your key     "Es2Fbgrno9htovlX6FcXiex6u0I" does not match the allowed keys specified in your application     settings. Check your application settings at http://www.facebook.com/developers

![api-key] https://i.sstatic.net/3cNRw.jpg

And here is the wrong key i get from the Android app :

![wrong-key] https://i.sstatic.net/hsK47.jpg

The key that i get from the app as an error is different from the key i have declared in Facebook developers

Upvotes: 0

Views: 2936

Answers (3)

Chefes
Chefes

Reputation: 1942

Generate a SHA1, this link can help you. Generating SHA1

Upvotes: 0

Srinivas Kattimani
Srinivas Kattimani

Reputation: 336

The key that is displayed in your error logs is the app signature sent by facebook. All you need to do is copy this key and paste it in your app dashboard,android app key_hash section.

Upvotes: 2

Bobby
Bobby

Reputation: 1676

Make sure to set the key on the developers site (Native Android App Key Hash) to the hash of your signing cert. This is different than the API key.

See the instructions here, Step 4: Add app signature to the Facebook App https://developers.facebook.com/docs/mobile/android/sso/

Es2Fbgrno9htovlX6FcXiex6u0I is your hash - set the "Android Key Hash" to this value on the site.

Upvotes: 0

Related Questions