Facebook API 登录失败,手机上安装了 FB 应用程序 [英] Facebook API login fails with FB app installed on phone

查看:27
本文介绍了Facebook API 登录失败,手机上安装了 FB 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个应用程序,它将支持 facebook.我已经从原始 Git 存储库下载了 facebook API 及其名为Hackbook"的示例.问题在于登录 - 如果原始 FB 应用程序未安装在手机上,则登录将通过自定义对话框进行并且一切正常,但如果安装了 FB 应用程序,Hackbook 会自动重定向到原始 FB 应用程序,然后什么也没有发生.登录是不可能的.我已经在五部不同的手机上对此进行了测试,但总是出现同样的问题.

I am building an app, which is going to have support for facebook. I have downloaded facebook API and their sample called "Hackbook" from original Git repos. The problem is with login - if original FB app is not installed on phone, the login is going through custom dialog and everything works, but if FB app is installed, the Hackbook automatically redirect to original FB app, and then nothing happened. It's impossible to login. I have tested this on five different phones, and always was the same problem.

推荐答案

我遇到了类似的问题.就我而言,我没有使用我的签名密钥创建哈希密钥.我刚刚使用 debug.keystore 默认签名密钥创建了一个哈希密钥.

I had a similar problem. In my case, I had not created a hash key using my signing key. I just had the one hash key created using the debug.keystore default signing key.

一旦我使用我的应用程序版本签名密钥创建了一个哈希密钥,这个问题就解决了.如果您还没有这样做,请使用您的签名密钥创建一个新的哈希密钥(用于在市场上上传)并将其添加到您应用的 Facebook 控制面板.

As soon as i created a hash key using my app release signing key, that problem was sorted out. If you haven't already done this, create a new hash key using your signing key (for uploading on the market) and add that to your app's facebook control panel.

希望这会有所帮助.

这篇关于Facebook API 登录失败,手机上安装了 FB 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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