Last active
January 9, 2019 04:07
-
-
Save ysam12345/e6a351e5fc1a5d45a422c1be03e14a07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBAction func btnLoginWithFacebookClicked(_ sender: Any) { | |
let fbLoginManager:FBSDKLoginManager = FBSDKLoginManager() | |
fbLoginManager.logIn(withReadPermissions: ["email"], from: self) {(result, error) in | |
if (error == nil){ | |
let fbLoginResult:FBSDKLoginManagerLoginResult = result! | |
if fbLoginResult.grantedPermissions != nil { | |
if(fbLoginResult.grantedPermissions.contains("email")) { | |
self.getFBUserData() | |
self.turnToIndexSreen() | |
//fbLoginManager.logOut() | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment