title: Facebook login callback not working when using Facebook app - Swift
body: <p>I had a perfectly functional application on the app store for over a year which featured Facebook signup and it all worked without any problems. However, few days ago I got few complaints from users who say that Facebook login causes the app to get stuck on login screen. I've investigated the behaviour and it seems that the callback from Facebook after clicking on login button does not work when you use Facebook app to authenticate. Going through Safari works. I've updated my Cocoapod libs to the latest version and in my AppDelegate I have the following:</p>
  
  <pre><code>func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -&gt; Bool {
  
       FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions) 
      return true
  }
  
  
  func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -&gt; Bool {
      return FBSDKApplicationDelegate.sharedInstance().application(app, open: url as URL!, sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String, annotation: options[UIApplicationOpenURLOptionsKey.annotation])
  }
  
  func applicationDidBecomeActive(_ application: UIApplication) {
      FBSDKAppEvents.activateApp()
  }
  </code></pre>
  
  <p>All my Plist files are in order, Facebook didn't suspend my app or anything similar, and again it works when I try to sign in using Safari. Version of iOS is 11 and i'm using Swift 3. </p>