title: connect Iphone with Facebook API
body: <p>I want to connect facebook API's with my IPhone. For this I have downloaded the FBConnect sdk and included the FBConnect group of FBConnect.xcodeproj in my application and then I have written the following code in FacebookAPPViewController.m</p>
  
  <pre><code>- (void)viewDidLoad{
       [super viewDidLoad];
       session = [FBSession sessionForApplication:@"a31c3e53bba4a5f2b3955d6e5e 876717" secret:@"6ecbefa3807406bd13187297e58efae9" delegate:self];
       FBLoginButton *button = [[[FBLoginButton alloc] init] autorelease];
       [self.view addSubview:button];
  
       FBLoginDialog* dialog = [[[FBLoginDialog alloc] init] autorelease];
       [dialog show];
  }
  </code></pre>
  
  <p>but it is showing error that <strong>session undeclared</strong>. That is right also because I have not initialized it but if I declare it with class `FBSession then also It displays some error and if I exclude this line then the button to connect to facebook does not appear.</p>
  
  <p>Can some one help me?</p>
  
  <p>Thanks in advance</p>
  
  <p>Gaurav </p>