title: Facebook sdk 3.5 error "com.facebook.sdk:ErrorLoginFailedReason"
body: <p>I'm using Facebook SDK 3.5, while login i'm getting following error:</p>
  
  <p>Here is the code which i'm using for facebook login  </p>
  
  <pre><code>- (BOOL)openSession:(BOOL)allowLogin
    {  
      NSArray *permissions = [NSArray arrayWithObjects:@"user_photos",@"email",@"user_location",@"offline_access", nil];
      return [FBSession openActiveSessionWithReadPermissions:permissions
            allowLoginUI:allowLogin
            completionHandler:^(FBSession *session1,
                                FBSessionState state,
                                NSError *error) {[
                                    self sessionStateChanged:session1 state:state error:error];
                                       }];  
    }
  
   - (void)sessionStateChanged:(FBSession *)session  state:(FBSessionState)state  error:(NSError *)error
     {        
       switch (state) {            
         case FBSessionStateOpen:
          {
  
          }
         break;
  
         case FBSessionStateClosed:            
         case FBSessionStateClosedLoginFailed:
          {
            [[FBSession activeSession] closeAndClearTokenInformation];  
          }
         break;       
  
         default:
         break;            
        }
  
      if (error) {
         UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error"   message:error.localizedDescription delegate:nil  cancelButtonTitle:@"OK"  otherButtonTitles:nil];
         [alertView show];
         [alertView release];
         }
     }
  </code></pre>
  
  <p><strong>Error</strong> </p>
  
  <pre><code>Domain=com.facebook.sdk 
  Code=2 "The operation couldn’t be completed. (com.facebook.sdk error 2.)" 
  UserInfo=0x1e0a3080 
    {
      com.facebook.sdk:ErrorLoginFailedReason=com.facebook.sdk:SystemLoginCancelled, 
      com.facebook.sdk:ErrorInnerErrorKey=Error 
      Domain=com.apple.accounts 
      Code=7 "The operation couldn’t be completed. (com.apple.accounts error 7.)",   
      com.facebook.sdk:ErrorSessionKey=&lt;FBSession: 0x1d5d69d0,
      state: FBSessionStateClosedLoginFailed,
      loginHandler: 0x0, 
      appID: 205008289575045, 
      urlSchemeSuffix: , 
      tokenCachingStrategy:&lt;FBSessionTokenCachingStrategy: 0x1e033950&gt;,
      expirationDate: (null), 
      refreshDate: (null),
      attemptedRefreshDate: 0001-12-30 00:00:00 +0000, permissions:(null)&gt;
     }
  </code></pre>
  
  <p>Any help would be appreciated.</p>