title: Facebook SDK for iOS, fbDidLogin never called in multi nib application
body: <p>this is my first time posting as I usually just come by to do research for issues, but this one I cannot figure out myself.</p>
  
  <p>Basically my problem is similar to other developers using the facebook sdk for iOS, my fbDidLogin function never gets called even after I log in and can make my posts to feed successfully. I looked at the other threads here such as <a href="https://stackoverflow.com/questions/4215797/fbdidlogin-never-called-facebook-ios-sdk">fbDidLogin never called (facebook-ios-sdk)</a> and <a href="https://stackoverflow.com/questions/4244609/fbdidlogin-not-called">fbDidLogin not called</a>, however I haven't been successful. My app has a main view that is loaded and upon button press it pulls in the second nib and replaces the view. That second view controller has the facebook functionality in there, and I feel like my issue might be connecting from the Appdelegate to that secondViewController. I noticed in the sample app that everything is set up in the appdelegate but that is not the way my program functions.</p>
  
  <p>I'm new to objective c programming but I've been fine in terms of building some apps so far, just this facebook sdk is killing me.</p>
  
  <p>I appreciate any direction people could throw at me. Thank you.</p>
  
  <p>Here's some of the code:</p>
  
  <pre><code>- (void)login {
      facebook=[[Facebook alloc]initWithAppId:FB_APP_ID];
      NSLog(@"Inside login/post to wall function.");
      NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                         @"mystuff",@"test",
                                         @"mystuff", @"link",
                                         @"mystuff", @"picture",
                                         mystuff, @"name",
                                         @"mystuff", @"caption",
                                         @"mystuff", @"description",
                                         @"mystuff",  @"message",
                                         nil];
      [facebook dialog:@"feed" andParams:params andDelegate:self];
  }
  
  /**
   * Invalidate the access token and clear the cookie.
   */
  - (void)logout {
      [facebook logout:self];
  }
  
  /**
   * Called when the user has logged in successfully.
   */
  -(void)fbDidLogin{
      NSLog(@"Inside fbDidLogin function.");
  }
  
  /**
   * Called when the user canceled the authorization dialog.
   */
  -(void)fbDidNotLogin:(BOOL)cancelled {
      NSLog(@"User did not login.");
  }
  </code></pre>