I have Facebook SDK integrated into my ios application. This is the code I use:
let loginManager = FBSDKLoginManager()
loginManager.loginBehavior = FBSDKLoginBehavior.Browser
loginManager.logInWithReadPermissions(["public_profile", "email"], fromViewController: context, handler: {(result, error) -> Void in
//My handling code
})
When I try to login with facebook for the first time, after installing the app, it goes through my code just fine but nothing happens - browser doesn't appear and handler doesn't fire, there's no error and there's nothing in logs. After that, it works every time I try to login, even after I force-quit the app.
I'm not really sure, if this problem appeared because of something I did, or if it was the problem from the first day.
Try by making loginManager
object global.