当安装FB应用程序时,Android Facebook示例应用程序不会登录 [英] Android Facebook sample app doesn't login when FB app installed

查看:355
本文介绍了当安装FB应用程序时,Android Facebook示例应用程序不会登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

起初我以为这是我的应用程序,但是当使用任何FB示例应用程序时,我得到完全相同的问题。

At first I thought this was my app but I get the exact same problem when using any of the FB sample apps.

以HelloFacebookSample为例,登录后,登录后会显示您的图片,并让您发布状态更新。

Take the HelloFacebookSample for example, which gives you a login button and after login shows you your pic and enables you to post status updates.

如果我的手机上没有安装FB应用程序登录按钮给我一个网络视图,我登录,照片出现在应用程序,我可以发布。但是,如果我的手机上安装了FB应用程序,则会弹出一个对话框,该对话框表示应用程序想要访问您的公开个人资料等。我按OK和.....没有任何内容。

If I don't have the FB app installed on my phone the login button gives me a web view which i login through and the photo appears in the app and i can make posts. However if the FB app is installed on my phone it brings up a dialog saying the app would like to access you public profile etc. I press OK and..... nothing.

我发现很多问题似乎相似,但问题通常是使用调试键而不是发行键,但是我从eclipse运行,所以调试键仍然适用。

I have found many questions that seem similar but the problem was usually using a debug key as opposed to a release key, but I am running from eclipse so the debug key is still appropriate.

任何想法?

推荐答案

如果您的手机中安装了默认的Facebook App,或者尝试在Google Play上传您的应用,然后您需要一个不同的KeyHash。因为,当你开发你的FB应用程序,你已经注册了你的FB应用程序与使用默认的debug.keystore创建的密钥哈希。

if there is the default Facebook App is installed in your phone or if you are trying to upload your app on Google Play, then you need a different KeyHash. because, when u developed your FB app you have registered your FB app with a key hash which is created by using the default debug.keystore.

所以现在你需要一个不同的KeyStore来生成不同的KeyHash。您需要一个签名的KeyStore,您可以通过本教程的帮助获得生成新密钥库后,生成密钥散列,并使用新的密钥哈希值注册您的FB应用程序。这应该工作。
生成新的KeyHash可以遵循此链接

so, now u need a different KeyStore to generate the different KeyHash. u need a signed KeyStore, which u can get by the help of this tutorial , after generating new keystore, generate a key hash and register your FB App with this new key hash. this should work. for generating new KeyHash u can follow this link

这篇关于当安装FB应用程序时,Android Facebook示例应用程序不会登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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