title: How to get native Facebook login on iOS using SDK 3.1?
body: <p>I downloaded the new <a href="https://developers.facebook.com/ios/" rel="nofollow">Facebook iOS SDK 3.1</a>, which promises to have a <a href="https://fbcdn-dragon-a.akamaihd.net/cfs-ak-ash4/85001/862/488167911203083-/screen-b.png" rel="nofollow">native login prompt</a>. I ran their sample login app on my iOS 6 device. When I attempted to connect with Facebook, I did not get a native login. Instead, the Facebook app launched - same as the old SDK. Their Facebook login button basically does this:</p>
  
  <pre><code>[appDelegate.session 
      openWithCompletionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
          [self updateView];
      }
  ];
  </code></pre>
  
  <p>I thought maybe the sample code isn't calling the right function. So I tried <a href="https://developers.facebook.com/docs/sdk-reference/iossdk/3.0/class/FBSession/#openWithBehavior%3acompletionHandler%3a" rel="nofollow">FBSession</a>'s other login function.</p>
  
  <pre><code>[appDelegate.session 
      openWithBehavior:FBSessionLoginBehaviorWithNoFallbackToWebView 
      completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
          [self updateView];
      }
  ];
  </code></pre>
  
  <p>I tried all possible behaviours and none of them popped up the native login prompt.</p>