title: Facebook iOS SDK 3.0 - session not open
body: <p>I am using the latest Facebook iOS SDK 3.0</p>
  
  <p>I need a help in in the login process:</p>
  
  <p>First I declare this property in <code>AppDelegate.h</code>:</p>
  
  <pre><code>@property (nonatomic, strong) FBSession *session;
  </code></pre>
  
  <p>and in ViewController class I get this to use it in the code as this:</p>
  
  <pre><code>AppDelegate *delegate = [[UIApplication sharedApplication]delegate];
  [delegate.session someproperty];
  </code></pre>
  
  <p>I also have this method in ViewController that get called from <code>viewDidLoad</code>:</p>
  
  <pre><code>-(void)login
  {
      AppDelegate *delegate = [[UIApplication sharedApplication]delegate];
      [delegate.session accessToken];
      NSLog(@"%d",delegate.session.isOpen);
      if (!delegate.session.isOpen)
      {
          delegate.session = [[FBSession alloc] init];
          if (delegate.session.state == FBSessionStateCreatedTokenLoaded)
          {
              [delegate.session openWithCompletionHandler:^(FBSession *session,
                                                        FBSessionState status,
                                                        NSError *error) 
              {
                NSLog(@"%d", delegate.session.isOpen); // First Line //////////////////
              }];
          }
          NSLog(@"%@", delegate.session.description);   // Second Line //////////////////
      }
   }
  </code></pre>
  
  <p>After the facebook app get authorized the firs <code>NSLog</code> print zero, and the second <code>NSLog</code> indicate that the <code>session</code> state is <code>FBSessionStateCreated</code> not <code>FBSessionStateOpen</code>?</p>
  
  <p>this is the output for the second <code>NSLog</code>:</p>
  
  <pre><code>2012-08-16 18:37:24.327 Facebook3[2418:f803] &lt;FBSession: 0x6890ff0, state:    FBSessionStateCreated, loginHandler: 0x0, appID: 193716877424306, urlSchemeSuffix: , tokenCachingStrategy:&lt;FBSessionTokenCachingStrategy: 0x6890f20&gt;, expirationDate: (null), refreshDate: (null), attemptedRefreshDate: 0001-12-30 00:00:00 +0000, permissions:()&gt;
  </code></pre>
  
  <p>What I am missing here.</p>
  
  <p>Note : in the app setting at <a href="https://developers.facebook.com" rel="nofollow">https://developers.facebook.com</a> I configure the app as this:
  1- Configured for iOS SSO: Enabled
  2- iOS Native Deep Linking: Enabled
  3- iOS Bundle ID : com.mycompany.appname</p>