For Swift, this worked for me (add it to AppDelegate.swift):
@available(iOS 9.0, *) func application(application: UIApplication,openURL url: NSURL, options: [String: AnyObject]) -> Bool { return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: options[UIApplicationOpenURLOptionsSourceApplicationKey] as! String, annotation: options [UIApplicationOpenURLOptionsAnnotationKey]) }
and
@available(iOS, introduced=8.0, deprecated=9.0) func application(application: UIApplication,openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool { return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication!, annotation: annotation) }
In each case, be sure to add import FBSDKCoreKit to other import statements.
This is basically what Google SignIn uses. If it still does not work, you need to install delegates and your info.plist, as indicated in FaceBook Docs. Hope this helps!
David Mar 18 '16 at 13:19 2016-03-18 13:19
source share