4

当我运行我的 facebook 应用程序时,我收到以下错误。允许密钥。在http://developers.facebook.com/apps/178779105632639配置您的应用程序密钥哈希...

在此处输入图像描述

任何想法?

4

3 回答 3

3

您生成的 hashkey 似乎不正确。您可以从以下代码生成应用哈希键。试试看

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) {
    }
}
于 2013-07-17T05:40:18.880 回答
0

1.它会帮助你。工作正常链接

2.在创建应用程序时,在开发人员站点中使用您的 cmd 提示生成的一些 keyhash,使用该 KeyHash 复制并粘贴到开发人员设置页面 keyhash 列中。

3.更改单点登录切换按钮-YES

于 2015-06-08T06:18:44.740 回答
-1

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.

于 2013-07-17T09:52:08.697 回答