从 iOS 11 开始,我在使用 FBSDKLoginKit 和 FBSDKCoreKit 时看到了新的登录流程。我意识到苹果最近对应用程序相互通信的方式进行了更改:facebook 凭据意味着我们首先必须在身份验证流程中通过 safari ...第二个屏幕截图)即使在其他具有 facebook 登录功能的应用程序中,我也可以直接转到 facebook.com,然后我可以选择通过 native Facebook 应用程序进行身份验证或使用电子邮件登录/密码(见第二张截图)。
有谁知道为什么我在我的应用程序上看到了这个流程,但在我看过的几乎所有其他应用程序上都看到了不同的流程,这些应用程序实现了 facebook 登录?我遵循了 https://developers.facebook.com/docs/facebook-login/ios 上列出的流程所以我很困惑。提前致谢。
最佳答案
您可以尝试更改登录管理器的loginBehavior
。参见 https://github.com/facebook/facebook-ios-sdk/blob/master/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.h#L72 .该警报是 iOS 11 的 SFAuthenticationSession 身份验证流程的一部分。
/** This is the default behavior, and indicates logging in through the native Facebook app may be used. The SDK may still use Safari instead. */ case native /** Attempts log in through the Safari or SFSafariViewController, if available. */ case browser /** Attempts log in through the Facebook account currently signed in through the device Settings. @note If the account is not available to the app (either not configured by user or as determined by the SDK) this behavior falls back to \c .native. */ case systemAccount /** Attempts log in through a modal \c UIWebView pop up @note This behavior is only available to certain types of apps. Please check the Facebook Platform Policy to verify your app meets the restrictions. */ case web
关于ios - iOS 上新的 Facebook 登录重定向流程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46570510/