Android facebook : invalid key. Android key mismatch

删除回忆录丶 提交于 2019-12-25 08:13:32

问题


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


回答1:


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.




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/10923735/android-facebook-invalid-key-android-key-mismatch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!