title: Facebook API dialog page showing error in second time and after that
body: <p>I want to share my app details.I just done as same given in facebook tutorial.When user loggen in and dialog page appears and i posted my msg.and it worked fine for first time only.when user tapped a button to share again,the dialog appears and showing error page </p>
  
  <p><code>"Error occurred with 'Your_APP_NAME'.please try again later."</code></p>
  
  <p>I followed the tutorial in the facebook link below here. <a href="https://developers.facebook.com/docs/mobile/ios/build/" rel="nofollow">https://developers.facebook.com/docs/mobile/ios/build/</a></p>
  
  <p>Here it is my code.</p>
  
  <pre><code>-(void)buttonPressed:(id)sender{
  facebook = [[Facebook alloc] initWithAppId:@"YOUR_APP_ID" 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];
  }else{
  [self postWall];
  }
  // Pre 4.2 support
  - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
      return [facebook handleOpenURL:url]; 
  }
  - (void)fbDidLogin {
      NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
      [defaults setObject:[facebook accessToken] forKey:@"FBAccessTokenKey"];
      [defaults setObject:[facebook expirationDate] forKey:@"FBExpirationDateKey"];
      [defaults synchronize];
      [self postWall];
  }
  -(void)postWall{
  
      NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                     kAppId,@"app_id",
                                     @"https://developers.facebook.com/docs/reference/dialogs/",@"link",
                                     @"http://fbrell.com/f8.jpg",@"picture",
                                     @"Facebook Dialogs",@"name",
                                     @"Reference Documentation",@"caption",
                                     @"Using Dialogs to interact with users.",@"description",
                                     @"Facebook Dialogs are so easy!",@"message",
                                     nil];
  
      [[self facebook] dialog:@"feed" andParams:params andDelegate:self];
  
  }
  </code></pre>
  
  <p>I do all this code in my viewcontroller file(Not in app delegate).I want to open facebook only when i press the button..So i put these codings in my buttonpressed method.</p>