Facebook不会在iOS 9中的didCompleteWithResult中返回数据
我试图实现Facebooklogin,其工作良好的iOS 8.4和它的工作良好的iOS 9.1,但今天早上我发现它有问题。
它在下面的代理函数中没有任何返回,所以app在testing器中closures
func loginButton(loginButton: FBSDKLoginButton!, didCompleteWithResult result: FBSDKLoginManagerLoginResult!, error: NSError!) { NSLog("Here") if let b = result { if ((error) != nil) { FBSDKLoginManager().logOut() JLToast.makeText("Facebook login error").show() } else if result.isCancelled { self.fbloginButton.enabled = false FBSDKLoginManager().logOut() FBSDKAccessToken.setCurrentAccessToken(nil) JLToast.makeText("You have cancelled facebook login").show() self.dismissViewControllerAnimated(true, completion: nil) } else { // If you ask for multiple permissions at once, you // should check if specific permissions missing if(result != nil) { if result.grantedPermissions.contains("email") { self.fbloginButton.enabled = false self.getFBUserData() //self.getFBUserDataWithoutEmail() } else { self.fbloginButton.enabled = false JLToast.makeText("Your email address has not been recovered from facebook account. Please provide it.") self.getFBUserDataWithoutEmail() } } else { JLToast.makeText("No Data.") } } } else { } }
我正在检查它的日志logging“在这里”,但是它不会更进一步,它closures应用程序。
请指导我
N:B: – 它在iOS 9中的SafariViewController中打开。