ios - iOS 上新的 Facebook 登录重定向流程

标签 ios facebook

从 iOS 11 开始,我在使用 FBSDKLoginKit 和 FBSDKCoreKit 时看到了新的登录流程。我意识到苹果最近对应用程序相互通信的方式进行了更改:facebook 凭据意味着我们首先必须在身份验证流程中通过 safari ...第二个屏幕截图)即使在其他具有 facebook 登录功能的应用程序中,我也可以直接转到 facebook.com,然后我可以选择通过 native Facebook 应用程序进行身份验证使用电子邮件登录/密码(见第二张截图)。

有谁知道为什么我在我的应用程序上看到了这个流程,但在我看过的几乎所有其他应用程序上都看到了不同的流程,这些应用程序实现了 facebook 登录?我遵循了 https://developers.facebook.com/docs/facebook-login/ios 上列出的流程所以我很困惑。提前致谢。

Login screen for FB iOS SDK enter image description here enter image description here

最佳答案

您可以尝试更改登录管理器的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/

相关文章:

ios - xcode 9模拟器布局故障

ios - 相机在 iOS 上不工作,getUserMedia 出错

facebook - iOS Facebook SDK 发送后未收到任何 "Request"

javascript - 如何在Facebook共享按钮中使用Angular JS传递URL

ios - CATransform3D.MakeScale 正在移动层

ios - 如何在轮换准备好重用后撤回不可见的 UICollectionViewCell?

php - 来自后端的字符串应包含表情符号,但呈现为重音字母

ios - .gitignore 用于 Xcode 项目

iphone - 安装 Facebook SDK - iPhone

c# - 使用 UWP 应用连接到 Facebook