简体   繁体   English

iOS Facebook使用SDK 4.12登录

[英]iOS Facebook Login with SDK 4.12

I am banging my head against getting Facebook Login to work wen upgrading to SDK 4.12. 我不愿意让Facebook登录才能升级到SDK 4.12。 It was working fine in our (very) old 3.x implementation. 在我们(非常旧的)3.x实现中,它运行良好。

I have followed every bit of documentation I can find, and have re-checked my code over and over. 我遵循了我所能找到的所有文档,并一遍又一遍地重新检查了我的代码。 Hopefully someone can provide some insight! 希望有人能提供一些见识!

My issue is, it simply does not allow for a 1 click single sign on. 我的问题是,它根本不允许1单击一次登录。 When the FBSDKLoginButton is clicked, it always brings up the Facebook web dialog to enter credentials. 单击FBSDKLoginButton时,它始终会调出Facebook Web对话框以输入凭据。 This is being run on an actual device, with the Facebook app installed and logged in. 这是在安装并登录了Facebook应用的实际设备上运行的。

Why can I not get it to simply allow access without signing in to Facebook? 为什么我不能在不登录Facebook的情况下简单地允许访问?

Simple code is as follows: 简单的代码如下:

FBSDKLoginButton *loginButton = [[FBSDKLoginButton alloc] init];
loginButton.readPermissions =
@[@"public_profile", @"email", @"user_friends"];
loginButton.delegate = self;

Delegate callbacks all working fine.. the only issue having to enter user/password on the Facebook pop up. 委托回调均正常工作..唯一必须在Facebook上输入用户名/密码的问题就会弹出。

(My device IS logged into Facebook in it's settings as well.) (我的设备也在其设置中登录到Facebook。)

Thank You! 谢谢!

Solution to this for those who like the old way.. use SDK 4.5.1. 对于那些喜欢旧方法的人,可以使用SDK 4.5.1。 It has the Facebook login flow as it was intended. 它具有预期的Facebook登录流程。 You may lose a few of the newest features available in 4.6, but it has solved all of our issues. 您可能会失去4.6中可用的一些最新功能,但是它已经解决了我们所有的问题。

https://developers.facebook.com/docs/ios/downloads https://developers.facebook.com/docs/ios/downloads

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

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