简体   繁体   中英

Facebook Login ViewController does not present

i´m trying to login with facebook in my firebase application. I set up everything like firebase and this facebook website says ( https://developers.facebook.com/docs/facebook-login/ios?locale=en_US ) The ViewController for logging in with facebook doesn´t show up. I can´t understand why. I tried everything...

I get these errors in Console:

-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.)

That´s my Info.plist file 在此处输入图片说明

in

didFinishLaunchingWithOptions 

in the AppDelegate, i wrote this like the tutorial on fb website says

FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)

and this in the application:openURL... function:

let handled: Bool = FBSDKApplicationDelegate.sharedInstance().application(application, open: url, sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String, annotation: options[UIApplication.OpenURLOptionsKey.annotation])

return handled

I installed these cocoapods for fb:

  pod 'FBSDKLoginKit'
  pod 'FBSDKCoreKit'
  pod 'FBSDKShareKit'

Thanks in advance

This bug has been fixed in 4.39.1 SDK release. https://developers.facebook.com/docs/ios/change-log-4x/

SOLVED THIS ISSUE:

in the pod file

pod 'FBSDKCoreKit', '~> 4.38.0'
pod 'FBSDKLoginKit', '~> 4.38.0'

pod install 

Clean build folder and run

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM