简体   繁体   English

Java / Android:Facebook SDK登录有两种方式,没有一种可行

[英]Java/Android: Facebook SDK login two ways and no one work

I have a problem with facebook login in android application. 我在Android应用程序中使用Facebook登录存在问题。 I've found two ways to do it: one old and deprecated, and the new one. 我发现有两种方法可以做到这一点:一种是旧的和过时的,另一种是新的。 When I've implemented deprecated, during testing all worked fine, while not having official facebook application installed. 当我实施不推荐使用的工具时,在测试过程中一切正常,同时未安装官方的Facebook应用程序。 After I've installed it, pre-check-in tells that my application is misconfigured. 安装后,预签入会告知我的应用程序配置错误。 When I've implemented the second way, it also didn't work. 当我实现第二种方法时,它也没有起作用。 It even didn't start session. 它甚至没有开始会话。

Link to the tutorials: Old way: http://www.androidhive.info/2012/03/android-facebook-connect-tutorial/ New way: http://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/ 链接至教程:旧方法: http : //www.androidhive.info/2012/03/android-facebook-connect-tutorial/新方法: http : //developers.facebook.com/docs/getting-started/facebook -sdk-for-android / 3.0 /

And also one thing, when I've added facebook projects to my workspace, the android suppot libraries in my sdk and in facebook sdk where not identical, so I've resolved it by changing facebook's one to those from Android SDK. 还有一件事,当我将Facebook项目添加到我的工作区时,我的sdk和facebook sdk中的android suppot库并不相同,因此我通过将facebook的库改为Android SDK中的库来解决了。

Set up your key hash correctly in order for native SSO to work. 正确设置密钥哈希,以便本机SSO正常工作。

http://facebook.stackoverflow.com/a/13499901/931354 http://facebook.stackoverflow.com/a/13499901/931354

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM