title: facebook integration iphone
body: <p>i try to integrate facebook api in my app for publish post to wall.
  Now i integrate code in my appdelegate but i don't know receive this errore at this line:
  "initWithAppId: not found"</p>
  
  <p>AppDelegate.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "FBConnect.h"
  #import "Facebook.h"
  
  @interface AppDelegate : NSObject &lt;UIApplicationDelegate, UITabBarControllerDelegate&gt; {
     UIWindow *window;
     UITabBarController *tabBarController;
     Facebook *facebook;
  }
  
  @property (retain, nonatomic) IBOutlet UIWindow *window;
  @property (retain, nonatomic) IBOutlet UITabBarController *tabBarController;
  @property (retain, nonatomic) Facebook *facebook;
  </code></pre>
  
  <p>AppDelegate.m</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
  
      [self.window addSubview:self.tabBarController.view];
  
      facebook = [[Facebook alloc] initWithAppId:@"168377643283604"];
      NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
      if ([defaults objectForKey:@"FBAccessTokenKey"] &amp;&amp; [defaults objectForKey:@"FBExpirationDateKey"]) {
          facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"];
          facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"];
      }
      [self.window makeKeyAndVisible];
  
     return YES;
    }
  </code></pre>