I am trying to utilize login process via Facebook`s iOS SDK, however, the login process is implemented via safari, instead of UIWebView. Is there any native way to fix this behavior? Or at least a simple/elegant solution?
let fbLoginManager = FBSDKLoginManager()
fbLoginManager.logInWithReadPermissions(["email"], handler: {
(result: FBSDKLoginManagerLoginResult!, error:NSError!) -> Void in
if ((error) != nil){
}
else if (result.isCancelled){
} else {
if(result.grantedPermissions.contains("email")){
print(result)
}
}
})
You can find some nice solutions here: