Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/109.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios PFFacebookUtils未登录_Ios_Facebook_Swift_Parse Platform - Fatal编程技术网

Ios PFFacebookUtils未登录

Ios PFFacebookUtils未登录,ios,facebook,swift,parse-platform,Ios,Facebook,Swift,Parse Platform,我正在尝试登录并保存一个用户,以便使用PFFacebookUtils进行解析。注意,我使用的是FBSDKLoginButton,我不想使用PFLoginViewController,我需要一个更自定义的登录。这是我的密码: func loginButton(loginButton: FBSDKLoginButton!, didCompleteWithResult result1: FBSDKLoginManagerLoginResult!, error: NSError!) { i

我正在尝试登录并保存一个用户,以便使用PFFacebookUtils进行解析。注意,我使用的是FBSDKLoginButton,我不想使用PFLoginViewController,我需要一个更自定义的登录。这是我的密码:

  func loginButton(loginButton: FBSDKLoginButton!, didCompleteWithResult result1: FBSDKLoginManagerLoginResult!, error: NSError!) {

    if error == nil {
      // this block of code is reached fine.


        PFFacebookUtils.logInInBackgroundWithReadPermissions(["public_profile"], block: { (user, error2) -> Void in
           // both error2 and user both print out to nil here
            print(error2)
            print(user)

            if let newUser = user {
                // inside this block of code is never reached

            }

        })
    }
}

有什么问题吗

请详细说明您面临的问题。一些日志会有帮助。有什么问题吗?你的问题不清楚。