Hi i am search the answer for avoid new facebooksdk redirect to safari.how to open facebook login view inside the app.if it redirect to safari may reject in app store? help
But what if I am not using FBSDKLoginManager...?
But what if I do not implement a Facebook login method in my ViewController and I am just using the FBSDKLoginButton Facebook SDK touch upside action outlet implementation to login, which by default uses the Safari browser?
How do I change the FBSDKLoginBehavior?
If you are using the FBSDKLoginButton without your own Touch Up Inside action outlet, aka, you just added a UIButton or UIView to your Storyboard and changed its type to FBSDKLoginButton and that was enough, when the UI Component was touched to get Safari Facebook Authentication working...
To change FBSDKLoginBehavior simply add an Outlet in your ViewController to your Storyboard FBSDKLoginButton and set loginBehavior, no need to use FBSDKLoginManager:
@IBOutlet weak var btnFbSignIn: FBSDKLoginButton!
override func viewDidLoad() {
btnFbSignIn.loginBehavior = FBSDKLoginBehavior.web
}