iOS Facebook SDK: An active access token must be used to query information about the current user

前端 未结 5 2168
温柔的废话
温柔的废话 2020-12-30 06:01

I have followed many examples and looked at many questions regarding this access token error, but I can\'t seem to find out why I am getting it or how to fix it.

I i

5条回答
  •  隐瞒了意图╮
    2020-12-30 06:34

    /* deprecated for google and facebook func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: AnyObject) -> Bool { let googleDidHandle = GIDSignIn.sharedInstance().handle(url, sourceApplication: sourceApplication, annotation: annotation)

        let facebookDidHandle = FBSDKApplicationDelegate.sharedInstance().application(
            application,
    

    open: url, sourceApplication: sourceApplication, annotation: annotation) print(facebookDidHandle) return googleDidHandle || facebookDidHandle } */

    So i used, func application(_ application: UIApplication, open url: URL, options: [String: AnyObject]) -> Bool {

        return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: options) || GIDSignIn.sharedInstance().handle(url as URL!, sourceApplication: options[UIApplicationOpenURLOptionsSourceApplicationKey] as! String, annotation: options[UIApplicationOpenURLOptionsAnnotationKey])
    }
    

    xcode 8 beta 3 , ios 10

提交回复
热议问题