我正在尝试在我的Firebase应用程序中使用Facebook登录。我设置了诸如Firebase之类的所有内容,并且该Facebook网站说(https://developers.facebook.com/docs/facebook-login/ios?locale=en_US) 用Facebook登录的ViewController没有出现。我不明白为什么。我尝试了一切...
我在控制台中收到这些错误:
-canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
The operation couldn’t be completed. (com.facebook.sdk.core error 3.)
在
didFinishLaunchingWithOptions
在AppDelegate中,我写的就像fb网站上的教程上所述
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
这在application:openURL ...函数中:
let handled: Bool = FBSDKApplicationDelegate.sharedInstance().application(application, open: url, sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String, annotation: options[UIApplication.OpenURLOptionsKey.annotation])
return handled
我为fb安装了这些cocoapods:
pod 'FBSDKLoginKit'
pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
预先感谢
答案 0 :(得分:2)
此错误已在4.39.1 SDK版本中修复。 https://developers.facebook.com/docs/ios/change-log-4x/
答案 1 :(得分:0)
已解决此问题:
在pod文件中
pod 'FBSDKCoreKit', '~> 4.38.0'
pod 'FBSDKLoginKit', '~> 4.38.0'
pod install
清理构建文件夹并运行