com.facebook.FacebookAuthorizationException:不明错误:密钥散列不匹配任何存储的密钥哈希 [英] com.facebook.FacebookAuthorizationException: UnknownError: Key hash does not match any stored key hashes

查看:1311
本文介绍了com.facebook.FacebookAuthorizationException:不明错误:密钥散列不匹配任何存储的密钥哈希的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我大量的时间尝试我的Andr​​oid应用程序与Facebook连接,但获得与哈希键excaption。我在这里对这个阅读的问题,但没更迭解决我的问题。

I am a lot of time try to connect my android app with facebook but get excaption with the hash key. I read question here about this but didn succes to solve my problem

我运行这个code获得哈希键

I run this code to get hash key

try {
    PackageInfo info = getPackageManager().getPackageInfo(
            "com.example.fishe", 
            PackageManager.GET_SIGNATURES);
    for (Signature signature : info.signatures) {
        MessageDigest md = MessageDigest.getInstance("SHA");
        md.update(signature.toByteArray());
        Log.d("com.example.fishe", Base64.encodeToString(md.digest(), Base64.DEFAULT));
        }
} catch (NameNotFoundException e) {

} catch (NoSuchAlgorithmException e) {

}

和它告诉我12-12 14:19:29.615:D / com.example.fishe(​​5834):5C440zhVwrb0ZQTs325My + VLZBo =

And it show me 12-12 14:19:29.615: D/com.example.fishe(5834): 5C440zhVwrb0ZQTs325My+VLZBo=

现在,当我运行应用程序,并尝试登录我得到异常:(现散列以' - '而不是'+')

Now when I run the app and try to log in I get exception : (now the hash is with '-' instead of '+')

14 12-12:16:30.105:E /(5834):com.facebook.FacebookAuthorizationException:不明错误:密钥散列5C440zhVwrb0ZQTs325My-VLZBo不匹配任何存储的密钥散列

12-12 14:16:30.105: E/(5834): com.facebook.FacebookAuthorizationException: UnknownError: Key hash 5C440zhVwrb0ZQTs325My-VLZBo does not match any stored key hashes.

我尝试插入到应用程序 - >编辑设置 - > https://developers.facebook.com < /一>第一次用+和secondt时间与散列键 - 。这两次,并在最后的=。
我在这两种情况下得到了ecxception ......怎么办?

I try to insert to app - >edit setting ->native android app in https://developers.facebook.com first time the hash key with '+' and secondt time with '-' . Both times with the '=' at the end. I got the ecxception in both cases... What to do?

推荐答案

所以这是晚了,但我绝对需要张贴这一点,因为我有这个问题了几个小时,当我解决它,我觉得真的很生气又哑。所以,我希望这可以帮助一些人。

so this is late but I absolutely need to post this because I had this problem for HOURS and when I solved it, I felt really angry and dumb. So I hope this helps some people.

在粘贴散列键进入Facebook的示例应用程序(我怀疑任何的Facebook应用程序)的网站上,一个小的下拉菜单会显示出来。 点击它,这样你输入的文字转换成一个小盒子。,然后点击保存。这不仅是足以粘贴,离开它,当您点击保存字符串。

When you paste your hash key into the facebook sample app (and I suspect any facebook app) on the website, a small drop down will show up. Click it so that your entered text is converted into a little box. THEN hit save. It is NOT just enough to paste it in and leave it as a string when you click on save.

这篇关于com.facebook.FacebookAuthorizationException:不明错误:密钥散列不匹配任何存储的密钥哈希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆