title: Facebook SDK 3.1: Unknown error during authorization process using pre-IOS6 emulator
body: <p>I have a problem when authorizing an application for the first time using Facebook sdk 3.1 if i ran the application in iPad 4.3 simulator. </p>
  
  <p>This is my code :</p>
  
  <pre><code>return [FBSession openActiveSessionWithReadPermissions:[NSArray arrayWithObjects:@"user_photos",nil] 
                   allowLoginUI:allowLoginUI
                   completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
                                            switch (state)
                   {
                       //case FBSessionStateCreated:
                       //case FBSessionStateCreatedTokenLoaded:
                       case FBSessionStateOpen:
  
                            [[FBSession activeSession] reauthorizeWithPublishPermissions:[NSArray arrayWithObjects:@"publish_stream", nil]
                                        defaultAudience:FBSessionDefaultAudienceFriends
                                        completionHandler:^(FBSession *session, NSError *error) {
                                              [self sessionStateChanged:session
                                                                  state:session.state
                                                                  error:error
                                                                success:success
                                                                failure:failure];
                                              }];
  
                           break;
                       default:
                           break;
                    }
  
           }];
  
  }
  </code></pre>
  
  <p>The application will call the safari and ask user to login. Once the application has been added to the Facebook, it trying to open a new page on safari I think that would be the reauthorizeWithPublishPermission part. Before it loaded that page, I have got kick out from Safari to the home screen of the iPad. This code here works on IOS6 although I have another issue on IOS6 so I have posted as a separate question.</p>
  
  <p>The error on the console is this:</p>
  
  <blockquote>
    <p>2013-02-12 10:15:16.012 PG Facebook[911:16b03] error = The operation couldn’t be completed. (com.facebook.sdk error 2.)
    2013-02-12 10:15:17.187 PG Facebook[911:16b03] FBConditionalLog: handleOpenURL should not be called once a session has closed
    Facebook[911:16b03] error = The operation couldn’t be completed. (com.facebook.sdk error 2.)
    wait_fences: failed to receive reply: 10004003</p>
  </blockquote>
  
  <p>These are the three main error i have seen on the console.
  Does anyone know what is wrong?</p>