答案 0 :(得分:3)
我通过实现这些功能同时解决了这个问题,即使facebook的开发者网站只列出了一个:
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
}
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
let shouldOpen :Bool = FBSDKApplicationDelegate.sharedInstance().application(
app,
openURL: url,
sourceApplication: options["UIApplicationOpenURLOptionsSourceApplicationKey"] as! String,
annotation: nil)
return shouldOpen
}
答案 1 :(得分:2)
答案 2 :(得分:1)
如果这对任何人都有帮助 - 我在分离的控制器上有Facebook登录按钮(特别是在提供单独的视图控制器的自定义视图中)。一旦我将按钮放在父视图控制器中,事情就会立即起作用。