title: facebook dialog failing silently when not called immediately after authorize
body: <p>I have the following function to post to Facebook using the latest iOS Facebook SDK.</p>
  
  <pre><code>-(void)fbPost:(NSMutableDictionary *) params{
      NSLog(@"fbPost called");
  
      if (![facebook isSessionValid]) {
          NSLog(@"session invalid, calling fblogin");
  
          [self fblogin];
      }
      if ([facebook isSessionValid]) {
          NSLog(@"session valid, calling publishToFB");
  
          [self.facebook dialog:@"stream.publish" andParams:params andDelegate:self];
  
      }
  
  }
  </code></pre>
  
  <p>It works fine when there is no existing session: it logs in to facebook, gets permissions, returns to the app, shows the dialog and publishes the status. However, when trying a second time, isSessionValid returns true the first time and nothing happens, although the log shows publishToFB is called. </p>
  
  <p>The session is persisted in fbDidLogin:</p>
  
  <pre><code>[[NSUserDefaults standardUserDefaults] setObject:self.facebook.accessToken forKey:@"AccessToken"];
      [[NSUserDefaults standardUserDefaults] setObject:self.facebook.expirationDate forKey:@"ExpirationDate"];
      [[NSUserDefaults standardUserDefaults] synchronize];
  </code></pre>
  
  <p>and loaded in application didFinishLaunchingWithOptions:</p>
  
  <pre><code>facebook.accessToken    = [[NSUserDefaults standardUserDefaults] stringForKey:@"AccessToken"];
  facebook.expirationDate = (NSDate *) [[NSUserDefaults standardUserDefaults] objectForKey:@"ExpirationDate"];
  </code></pre>
  
  <p>I made sure to ask for offline_access permission when logging in:</p>
  
  <pre><code>_permissions =  [[NSArray arrayWithObjects:
                        @"publish_stream",@"offline_access",nil] retain];
  </code></pre>