0
Ich stehe vor einem Problem, nachdem ich zu Swift 3 gewechselt habe - Nachdem der Benutzer auf die Facebook-Anmeldeschaltfläche geklickt hat, passiert nichts.Ich melde mich nicht bei Firebase an, nachdem ich mich bei Facebook angemeldet habe. Swift 3
Dies ist mein Code nach 3 bis Swift bewegen:
func loginButton(_ loginButton: FBSDKLoginButton!, didCompleteWith result: FBSDKLoginManagerLoginResult!, error: Error!) {
print("user logged in")
self.loginButton.isHidden = true
activityIndicator.startAnimating()
if error != nil {
self.loginButton.isHidden = false
activityIndicator.stopAnimating()
print("???")
//handle errors
} else if result.isCancelled {
self.loginButton.isHidden = false
activityIndicator.stopAnimating()
let loginManager = FBSDKLoginManager()
loginManager.logOut()
//handle cancel
print("canceled")
} else {
let credential = FIRFacebookAuthProvider.credential(withAccessToken: FBSDKAccessToken.current().tokenString)
FIRAuth.auth()?.signIn(with: credential) { (user, error) in
print("user logged to firebase app")
}
}
Es ist nicht user logged in
druckt und auch nicht user logged to firebase app