在AppDelegate中
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
return true
}
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
}
func applicationDidBecomeActive(application: UIApplication) {
FBSDKAppEvents.activateApp()
}
即使我没有使用这些方法,登录工作正常 并在我的注销方法
FBSDKAccessToken.setCurrentAccessToken(nil)
FBSDKProfile.setCurrentProfile(nil)
loginView.logOut()
然后在AppDelegate类中使用这些方法是什么?
答案 0 :(得分:2)
通常FBSDKApplicationDelegate
后处理来自Facebook登录或Facebook对话的结果(或任何需要切换到本地Facebook应用程序或Safari的操作)。可以在official doc