Ios PFFacebookUtils未登录
我正在尝试登录并保存一个用户,以便使用PFFacebookUtils进行解析。注意,我使用的是FBSDKLoginButton,我不想使用PFLoginViewController,我需要一个更自定义的登录。这是我的密码: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
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
}
})
}
}
有什么问题吗 请详细说明您面临的问题。一些日志会有帮助。有什么问题吗?你的问题不清楚。