且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

“发生错误"使用 Facebook 的 android sdk 进行身份验证时

更新时间:2022-06-17 08:07:22

我也遇到了这个问题.首先,我需要知道您在 facebook 应用程序上输入的密钥哈希值是ga0RGNYHvNM5d0SLGQfpQWAPGJ8=",那么这就是问题所在.我想你进入了

I also faced this problem. First of all I need to know which Key Hash value you entered on facebook app if it is 'ga0RGNYHvNM5d0SLGQfpQWAPGJ8=' then that is the problem. I think you entered

keytool -exportcert -alias androiddebugkey -keystore~/.android/debug.keystore |openssl sha1 -binary |openssl base64

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

终端上的这个,您输入自己的密码以生成密钥哈希.如果您这样做了,请尝试执行以下操作,同时您在终端上输入上述命令(我使用的是 UBUNTU(linux).您键入与您使用的操作系统相对应的命令)并输入密码为android".这次你会得到一个不同的嘿哈希值.复制该值并将其保存为您的 facebook 应用程序的密钥哈希值.之后检查它是否工作.对我来说它奏效了.当我们使用调试键时会发生这种情况.毕竟,当您即将在 Android 市场上发布此应用程序时,您将不得不根据您使用的私钥再次更改密钥哈希值.试试这个可能对你有帮助.

this one on the terminal and you entered your own password to generate the key hash. if you done that please try do the following things also you enter the above command on terminal(I am using UBUNTU(linux). You type the command corresponding to which OS you are using) and enter the password as 'android'. This time you will get a different hey hash value. Copy that value and save it as the key hash value for your facebook app. After that check it is working or not. For me it worked. This will occur when we are using the debug key. After all this when you are about to publish this application on the Android market you will have to again change the key hash value according to the private key you are using. Try this may be this will help you.