应用程序是错误配置为Facebook登录与发布密钥散列密钥、应用程序、错误、Facebook

2023-09-12 21:38:46 作者:王者掌权

我综合型的Facebook我的应用程序。我测试了我的应用程序与调试密钥散列是好的在模拟器和我的设备的HTC。当我试图释放键散列为我签名的APK,应用程序配置错误的Facebook登录错误总是发生在我的设备的HTC One X的。

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.

密钥工具-exportcert -alias安卓-keystore C:\ android2012 \ android.keystore | OpenSSL的SHA1 -binary | OpenSSL的BASE64

我使用上述命令生成的释放键哈希值。别名是机器人。它输入密码后,成功生成密钥散列。这个密钥散列,输入到Facebook的仪表板,我试图在我的签署APK访问,但失败了。

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!

推荐答案

为什么它的工作原理在模拟器上,甚至在设备上,而你是测试它是因为,虽然从日食测试,您使用的 debug.keystore 的,而不是你释放键。

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.

解决方案1:

尝试此链接:http://www.helloandroid.com/tutorials/using-facebook-sdk-android-development-part-1.我发现,使用得到一个哈希键的Facebook的方法并不总是工作作为标榜。这个环节却拥有获得散列键不同的方法,并有pretty的多一直工作。

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.

解决方案2:

话虽这么说,我总是发现这样做是,让Facebook的SDK告诉你,你的散列关键字是什么的最简单的事。这是迄今为止更简单,不是一两分钟,不应该采取更多。

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.

步骤1: 在你的Facebook SDK中找到的 Util.java 的类。在此,改变这个:

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

private static boolean ENABLE_LOG = false;

private static boolean ENABLE_LOG = true;

步骤2: 创建一个新签名APK,转移到您的设备和安装。如果已经安装了,当然,它会提示。

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

第三步:用你DDMS(logcat中)运行,并连接到计算机设备,运行应用程序并继续寻找的键不匹配的警告。这种警告在实际散列键。复制的钥匙,去你的Facebook开发者页面,添加新密钥到列表中。

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.