应用程式错误配置为Facebook登录与释放密钥哈希 [英] App is misconfigured for Facebook Login with Release Key Hash

查看:222
本文介绍了应用程式错误配置为Facebook登录与释放密钥哈希的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将Facebook整合到我的应用程序中。我测试了我的应用程序与调试密钥哈希在模拟器和我的设备HTC是好的。当我为已签名的APK尝试发行密钥哈希时,我的设备HTC One X中总是发生应用程序配置错误的Facebook登录错误。



keytool - exportcert -alias android -keystore C:\android2012\android.keystore | openssl sha1 -binary | openssl base64



我使用上述命令来生成释放密钥哈希。别名是android。输入密码后,成功生成密钥哈希。这个关键哈希输入到Facebook仪表板,我试图访问我签名的APK,但失败了。



任何人都可以帮助?卡住了这个错误几天。非常感谢!

解决方案

为什么它在模拟器上甚至在设备上工作,而您正在测试是因为在测试从eclipse,你使用 debug.keystore 而不是你的发行版。



按照下面的两个解决方案之一,你应该是好的



解决方案1:



尝试此链接: http://www.helloandroid.com/tutorials/using-facebook- SDK-Android的发展,部分1 。我发现使用Facebook方法获取哈希密钥并不总是像广告一样工作。然而,这个链接有一个不同的方法来获取哈希密钥,并且几乎总是有效。



解决方案2:



据说,我总是发现最简单的事情是,让Facebook SDK告诉你你的哈希密钥是什么。这是更简单,不应该花费几分钟。



步骤1:
在您的Facebook SDK中,找到 Util.java 类。在此,请更改:

  private static boolean ENABLE_LOG = false; 

to:

 code> private static boolean ENABLE_LOG = true; 

步骤2:
创建一个到您的设备并安装。如果已经安装了,那么它将自动提示。



步骤3:运行DDMS(Logcat)并将设备连接到计算机,运行应用程序并保留寻找密钥错误警告。该警告具有实际哈希键。复制该密钥,转到您的Facebook开发人员页面,并将新密钥添加到列表中。


I've intergrated Facebook to my App. I tested my App with Debug Key Hash was alright in emulator and my device HTC. When I tried the Release Key Hash for my signed APK , "App is misconfigured for Facebook login" error always happened in my device HTC One X.

keytool -exportcert -alias android -keystore C:\android2012\android.keystore | openssl sha1 -binary | openssl base64

I used the above-mentioned command to generate the Release key hash. The alias name is "android". It successfully generated the key hash after entering password. This key hash was input into the Facebook Dashboard and I tried to access in my signed APK but it failed.

Anyone can help? Stuck with this error for few days. Thanks a lot!

解决方案

Why it works on the emulator or even on the device while you are testing it is because, while testing from eclipse, you use the debug.keystore and not your release key.

Follow one of the two solutions below, and you should be good to go.

Solution 1:

Try this link: http://www.helloandroid.com/tutorials/using-facebook-sdk-android-development-part-1. I found that using the Facebook method of getting a Hash Key did not always work as advertised. This link however, has a different method of getting the Hash Key and has pretty much always worked.

Solution 2:

That being said, I always found the simplest thing to do was, let the Facebook SDK tell you what your Hash Key is. This is by far more simpler and shouldn't take more than a couple of minutes.

Step 1: In your Facebook SDK, locate the Util.java class. In that, change this:

private static boolean ENABLE_LOG = false;

to:

private static boolean ENABLE_LOG = true;

Step 2: Create a new Signed APK, transfer to your device and install. If it is already installed, naturally, it will prompt.

Step 3: With your DDMS (Logcat) running and your device connected to the computer, run the application and keep looking for a key mismatch warning. That warning has the actual Hash Key. Copy that key, go to your Facebook Developer page and add the new key to the list.

这篇关于应用程式错误配置为Facebook登录与释放密钥哈希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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