实现android系统中的Facebook [英] Implementing facebook in android
问题描述
我使用的Facebook的publishing.Everything的新的SDK,只是我无法从我的Android应用程序登录工作正常,如果已经安装了Facebook的意思,如果的Facebook 应用程序就是n * OT安装在手机的*我可以成功地发布数据以通过我的移动应用程序,但如果用户的已安装Facebook应用程序的Facebook,我不能发布我的数据
Hi i am using new sdks of facebook for publishing.Everything is working fine except that i am unable to login from my android app if already facebook is installed means that if facebook application is n*ot installed on phone* i can sucessfully post data to facebook through my mobile application but if user has installed the facebook app , i cannot post my data.
请帮我在这的东西..
Kindly help me in this stuff..
对不起,英语不正确。
推荐答案
看你的问题,我建议你看一下的这个。
问题的症结是,Windows上的密钥工具弄乱了关键的哈希值。
做
Looking at your problem I suggest you look at this. The crux of the problem is that the keytool on windows messes up the key hash. Do
的keytool -export ......
而不是密钥工具-exportcert ...的;
两者生成密钥,但第二个弄乱它。
Both generate keys but the second one messes it up.
您也可以把这个在您的活动得到钥匙
You can also get the key by putting this in your activity
try {
PackageInfo info = getPackageManager().getPackageInfo("com.yourcompany.client", PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("Hash Key:", Base64.encode(md.digest()));
}
} catch (NameNotFoundException e) {
} catch (NoSuchAlgorithmException e) {
}
这篇关于实现android系统中的Facebook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!