title: Facebook iOS 3.1 SDK: can login with Safari but not natively
body: <p>I'm integrating the iOS 3.1 Facebook SDK. When implementing a login with Facebook feature, I call <code>FBSession openActiveSessionWithReadPermissions:allowLoginUI:completionHandler:</code>. When called on the simulator (where I don't have a FB account set up natively) I can successfully login. </p>
  
  <p>However, from a device with a native Facebook account setup, when calling <code>openActiveSessionWithReadPermissions...</code> the session type returned in the completion handler is always <code>sessionStateClosedLoginFailed</code>, regardless of whether I allow or disallow my app to use Facebook in the alert dialog. The session state before calling the method is <code>sessionStateCreated</code>.</p>
  
  <p>This is the <code>NSError</code> from the completion handler:
  <code>Error Domain=com.facebook.sdk Code=2 "The operation couldn’t be completed. (com.facebook.sdk error 2.)" UserInfo=0x20a80820 {com.facebook.sdk:ErrorLoginFailedReason=com.facebook.sdk:ErrorLoginFailedReason, com.facebook.sdk:ErrorInnerErrorKey=Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (No value.) UserInfo=0x208ed930 {NSDebugDescription=No value.}}</code></p>
  
  <p>What am I doing wrong that would cause this problem?</p>
  
  <p><em>Update</em>: I just noticed that my app is not appearing in the Settings > Facebook > "Allow these apps to use your account' section. (It was definitely there earlier today). </p>
  
  <p><em>Update2</em>: If I delete my account from the iOS Settings app, and then log my test user into the Facebook iPhone app, I am able to login with fast app switching. So it appears to only be a problem with the native account.</p>
  
  <p><em>Update3</em>: I ran the sample Facebook app Scrumptious I have the same problem. Upon clicking 'Login', which calls the <code>openActiveSessionWithRead...</code> I get the same error.</p>
  
  <p><em>Update4</em>: Possibly related to this bug? <a href="http://developers.facebook.com/bugs/450137751688028?browse=search_50a43a39b37ae4868318658" rel="nofollow">http://developers.facebook.com/bugs/450137751688028?browse=search_50a43a39b37ae4868318658</a></p>
  
  <p><em>Update5</em>: I should have mentioned this earlier, but it was a Facebook test user account that had this problem.</p>