iphone - 在 iOS 中集成 Facebook SDK

标签 iphone ios facebook

在 iOS 中,当我在我的应用程序中集成 facebook sdk 时出现此错误 “FBSDKLog:无法使用 Facebook 应用程序或 Safari 进行授权,fb394371460678795 未注册为 URL Scheme” 如何在 ios 中将 facebook 登录页面作为单独的应用程序打开。

最佳答案

要通过 iOS 应用程序登录 facebook,可以使用三个选项

  1. 如果 native facebook 应用程序可用,您将被定向到该应用程序(您需要注册 url scheme)

  2. 如果 Safari 可以启动,您将通过 safari 转到 facebook 的登录页面((您需要注册 url scheme))

  3. 如果这两个选项不可用(您收到此错误),您将获得一个可以登录的 Web View

您的错误消息显示前两个选项在您的情况下不可用,可能您可能忘记注册 url 方案

enter image description here

更新

FacebookSDK 3.9 中,他们又添加了一个登录流程(iOS 登录对话框),获得更高的优先级。根据来自 documentations 的 SDK 3.9 .

1.iOS Login Dialog
2.Facebook App Native Login Dialog
3.Facebook App Web Login Dialog
4.Mobile Safari Login Dialog

If the person has set up their Facebook account on the device, then that login dialog option is selected. If the Facebook account is not set up, the Facebook SDK checks to see if the Facebook app is installed on the device. If the Facebook app is installed, the Facebook app native login dialog is presented if it's supported. If the native login dialog can't be displayed, the Facebook app mobile login dialog is presented. If the Facebook app isn't installed, mobile Safari is launched to display the login dialog.

关于iphone - 在 iOS 中集成 Facebook SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17023059/

相关文章:

iphone - 使用 NSRegularExpression 匹配 HTML

iphone - 在 nsdocument 目录中添加 uiimage 并检索

ios - 如何使用 UIImageView iOS 中的启动图像集?

ios - iOS 中使用 Google 登录的 Google Endpoints

java - 在 Java servlet 中处理大量数据

ios如何获取应用程序启动时间?

iphone - 使用 Storyboard设置导航 Controller 时出现问题

objective-c - 是否可以在特定的 UIView 中显示 UIAlertView?

Facebook 错误 3506 "The action type likes:Like does not exist or is not approved"我该如何解决这个问题?

Facebook Oauth 授权重定向在 Internet Explorer 中因扩展权限失败