Android facebook : invalid key. Android key mismat

2019-09-06 16:00发布

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] http://imgur.com/8uTnu

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

![wrong-key] http://imgur.com/TCD5k

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

3条回答
时光不老,我们不散
2楼-- · 2019-09-06 16:25

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.

查看更多
Animai°情兽
3楼-- · 2019-09-06 16:32

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

查看更多
神经病院院长
4楼-- · 2019-09-06 16:45

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.

查看更多
登录 后发表回答