问题描述
下载Facebook最近Android SDK中3.7,我试图在SDK中运行示例应用程序。当我试图helloFacebookSample的应用程序,我得到hashkey问题。我通过搜索网页和得到了我的hashkey正确即 DSygOIIJUkYyHy / duT1e72ZHl5U =
。
Downloaded recent facebook android sdk 3.7 and i tried to run sample apps in the sdk. When I tried helloFacebookSample app i got hashkey problem. I searched through web and got my hashkey correct i.e DSygOIIJUkYyHy/duT1e72ZHl5U=
.
我的应用程序是显示hashkey未存储的错误。当我登录我的示例应用程序hashkey我发现了奇怪的事情发生了。
My app is showing "hashkey not stored" error. When I logged my sample app hashkey I found strange thing happening.
我用这code:
Toast.makeText(getApplicationContext(),Base64.encodeToString(md.digest(), Base64.DEFAULT), Toast.LENGTH_LONG).show();
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
Toast.makeText(getApplicationContext(),Base64.encodeToString(md.digest(), Base64.DEFAULT), Toast.LENGTH_LONG).show();
同一块code是显示不同HASHKEYS
Same piece of code is showing different hashkeys
DSygOIIJUkYyHy/duT1e72ZHl5U=
2jmj7l5rSw0yVb/vlWAYkK/YBwk=
当我尝试后状态就显示出不同的hashkey。
and when I try to post status it shows a different hashkey.
DSygOIIJUkYyHy_duT1e72ZHl5U=
我已存储的所有三个HASHKEYS在我的示例应用程序,它仍然显示我这个错误。
I have stored all three hashkeys in my sample app, and it is still showing me this error.
推荐答案
当你的应用程序犯规的匹配与你已经把在Facebook开发的网站上的一个产生hashkey这个问题通常是。尝试以编程方式生成hashkey并把它在开发者网站。希望该解决方案帮助
This problem usually comes when hashkey generated by your app doesnt match with the one which you have put in facebook developers site. Try to generate the hashkey programmatically and put it in developers site. Hope this solution helps
这篇关于Hashkey错配的Android的Facebook应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!