Facebook error : allow key: configure your app key hashes at dev.facebook android [duplicate]

假如想象 提交于 2019-12-21 18:01:43

问题


When i run my facebook apps i get the following error. allow key. Configure your app key hashes at http://developers.facebook.com/apps/178779105632639 ...

Any idea?


回答1:


It seems that hashkey you generated is not correct. You can generate app hash key from the following code. Try it

public static void showHashKey(Context context) {
    try {
        PackageInfo info = context.getPackageManager().getPackageInfo(
                "com.example.project", PackageManager.GET_SIGNATURES); //Your package name here
        for (Signature signature : info.signatures) {
            MessageDigest md = MessageDigest.getInstance("SHA");
            md.update(signature.toByteArray());
            Log.v("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
            }
    } catch (NameNotFoundException e) {
    } catch (NoSuchAlgorithmException e) {
    }
}



回答2:


1.It will Help you.Working fine link

2.while creating app, in developer site using some keyhash generated by your cmd prompt,use that KeyHash copy and paste in developer Settings Page keyhash Column.

3.change the Single sign on toggle button-YES




回答3:


You need to generate a hash key for your application and register that to the FB Developers console where you have created the application. I have written a blog for the same. You can find it out at : http://www.solutionanalysts.com/blog/android-generate-key-hash-facebook

Hope this helps you.



来源:https://stackoverflow.com/questions/17691470/facebook-error-allow-key-configure-your-app-key-hashes-at-dev-facebook-androi

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