title: FBSDKLoginManager is not working
body: <p>In my application the login with facebook was working before, but in last facebook sdk update (testing in iOS 9.0), it's not working.</p>
  
  <p>1) When the user tap login with Facebook, the SFSafariViewController is shown (although the Facebook app is installed, the behavior is that open the SVC by default ~ but ok, that's not a problem):</p>
  
  <p><img src="https://i.stack.imgur.com/VOTaI.png" alt="SFSafariViewController screentshot"></p>
  
  <p>2) Then from the screen above, when the user choose Login With Facebook App (from facebook page), it show an alert asking that facebook want to open Facebook app:</p>
  
  <p><img src="https://i.stack.imgur.com/93Uxj.png" alt="Dialog confirmation to open facebook App"></p>
  
  <p>3) When the user tap "Open" from the dialog. I don't know why but the callback of FBSDKLoginManager is getting called with FBSDKLoginResult cancelled (isCancelled property). And the following message appear in console:
  FBSDKLog: <strong>ERROR</strong>:
   The SFSafariViewController's parent view controller was dismissed.
  This can happen if you are triggering login from a UIAlertController. Instead, make sure your top most view controller will not be prematurely dismissed.</p>
  
  <p>4) Anyway the user is moved to the Facebook Application, from there the user can tap "Ok" (in case already authorized)</p>
  
  <p>Finally when the user tap "Ok", is return back to the app, but the callback is not called.</p>
  
  <p>Note: I have setup all the LSApplicationQuerySchema for Facebook. Also the two methods of openURL:</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
  
  - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary&lt;NSString*, id&gt; *)options
  </code></pre>