title: Facebook SSOw Login and Posting Image not working.
body: <p>I will try and be as in-depth as possible. I followed the guide on the Facebook dev site and ended up with this code:</p>
  
  <p>in my AppDelegate.h:</p>
  
  <pre><code>@interface AppDelegate : UIResponder &lt;UIApplicationDelegate, FBSessionDelegate&gt; {
  ...    
  Facebook *facebook;
  }
  @property (nonatomic, retain) Facebook *facebook;
  </code></pre>
  
  <p>In the AppDelegate implementation I have specified the facebook appid etc. </p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
    sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
      return [facebook handleOpenURL:url]; 
  }
  
  - (void)fbDidLogin {
      NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
      [defaults setObject:[facebook accessToken] forKey:@"FBAccessTokenKey"];
      [defaults setObject:[facebook expirationDate] forKey:@"FBExpirationDateKey"];
      [defaults synchronize];
  
  }
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
      self.menuViewController = [[MenuViewController alloc] init];
      UIView *menuView = self.menuViewController.view;
  
      facebook = [[Facebook alloc] initWithAppId:@"172938549507285" andDelegate:self];
  
      NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
      if ([defaults objectForKey:@"FBAccessTokenKey"] 
          &amp;&amp; [defaults objectForKey:@"FBExpirationDateKey"]) {
          facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"];
          facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"];
      }
  
      if (![facebook isSessionValid]) {
          [facebook authorize:nil];
      }
      ... 
  }
  </code></pre>
  
  <p>and just incase my app was never closed I have implemented the same method in:</p>
  
  <pre><code>- (void)applicationWillEnterForeground:(UIApplication *)application
  {   
  
      facebook = [[Facebook alloc] initWithAppId:@"172938549507285" andDelegate:self];
  
      NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
      if ([defaults objectForKey:@"FBAccessTokenKey"] 
          &amp;&amp; [defaults objectForKey:@"FBExpirationDateKey"]) {
          facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"];
          facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"];
      }
  
      if (![facebook isSessionValid]) {
          [facebook authorize:nil];
              NSLog(@"Facebook session is not valid");
      }
      NSLog(@"Application Entering Foreground.. setting segue to login flag");
      [defaults setObject:@"yes" forKey:@"shouldgotologin"];
      [defaults synchronize];
  
  }
  </code></pre>
  
  <p>However even after implementing all this I never get the facebook login window open... It just never comes up... it came up once before... But I now never see anything in my console log.... I dont really know why... I am very lost. can someone help me? Please dont direct me to the Facebook dev site... that is where I just came from thanks!. </p>