InFirebase 2.5.1, I used to do this, and it was working:
@IBAction func facebookLoginDidTouch(sender: AnyObject) {
let facebookLogin = FBSDK
After you successfully login with facebook and get user data back ... you have to add firebase authentication stuff like
@IBAction func facebookLoginDidTouch(sender: AnyObject) {
let facebookLogin = FBSDKLoginManager()
facebookLogin.logInWithReadPermissions(["public_profile", "email"], fromViewController: self, handler: {
(facebookResult, facebookError) -> Void in
if facebookError != nil {
print("Facebook login failed. Error \(facebookError)")
} else if facebookResult.isCancelled {
print("Facebook login was cancelled.")
} else {
// your firebase authentication stuff..
let credential = FIRFacebookAuthProvider.credentialWithAccessToken(FBSDKAccessToken.currentAccessToken().tokenString)
FIRAuth.auth()?.signInWithCredential(credential) { (user, error) in
if error != nil {
print("Login failed. \(error)")
} else {
print("Logged in!")
}
})
}
})
}