3

所以我按照解析网站 ( https://www.parse.com/docs/ios_guide#fbusers/iOS ) 上的步骤添加 Facebook 登录。但是 Xcode 给了我错误 '() -> FBSDKApplicationDelegate!' 我的应用程序委托文件中的以下代码行没有名为“应用程序”的成员

    func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool {
    return FBSDKApplicationDelegate.sharedInstance.application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
}

我错过了什么?

4

1 回答 1

7

看起来您缺少 sharedInstance 的括号。

func application(application: UIApplication, openURL url: NSURL, sourceApplication: String, annotation: AnyObject?) -> Bool {
    return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
}
于 2015-04-10T21:42:22.627 回答