gpt4 book ai didi

facebook - 默认 FBSDKLoginBehavior.Native 不适用于 iOS 9

转载 作者:行者123 更新时间:2023-11-30 05:21:34 25 4
gpt4 key购买 nike

我刚刚将我的应用程序升级到 Xcode 7/Swift 2.0,我正在努力通过 AppSwitch 登录 Facebook。我使用最新的 FBSDK (4.6) 并根据 upgrade guide 做了所有事情.不过,在 iOS9 上,Facebook 登录是通过应用内浏览器进行的,appswitch 不再起作用。我也尝试过强制设置登录行为但没有运气:

let manager = FBSDKLoginManager()
manager.loginBehavior = FBSDKLoginBehavior.Native
manager.logInWithReadPermissions(facebookReadPermissions, fromViewController: nil, handler: { (loginResult, error) -> Void in

我可以做些什么来让 appswitch 再次工作吗?

谢谢!

最佳答案

事实证明,这不是问题,而是根据来自 Facebook 的这些帖子的新期望行为:

https://developers.facebook.com/bugs/1636969533209725/?comment_id=1011596265571252

This behavior is by design. In our latest iOS SDKs, the login behavior is now controlled on the server side in order to ensure the best user experience.

https://developers.facebook.com/bugs/786729821439894/?comment_id=1467419033584031

Because of introduced changes in iOS 9, This new behavior avoids the user to be asked if they want to go and open the Facebook Application, accept the permissions/share/etc, and then ask once more if they want to switch back to your app.

https://developers.facebook.com/bugs/1390559277910338/?comment_id=1661064587442645

System authentication doesn't give people control over the information they share with apps. And in iOS 9, fast-app-switching to the Facebook native app results in additional dialogs ("ExampleApp would like to open Facebook") which appear twice - once on the way from ExampleApp to Facebook, and once again on the return journey. We believe the default SDK behavior in v4.6 on iOS 9 offers the best experience to people logging into your app with Facebook.

关于facebook - 默认 FBSDKLoginBehavior.Native 不适用于 iOS 9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32635644/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com