title: Posting image with caption with Facebook IOS SDK 3.1 and Graph API
body: <p>I'm new to facebook SDK.
  Last time I used facebook IOS SDK 3.0 and posting image through graph API. It is working but now it's not. I upgraded to 3.1 but still, it always return HTTP ERROR 200. Is there anyone can help me?</p>
  
  <p>this is the code </p>
  
  <pre><code>- (void) facebookPostPhoto:(UIImage *)photo withMessage:(NSString *)msg withOkAction:(SEL)okAction andNGAction:(SEL)ngAction withTarget:(id)target {
  ok = okAction;
  ng = ngAction;
  curView = target;
  NSMutableDictionary *params;
  params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
            UIImageJPEGRepresentation(photo, 90), @"source",
            msg, @"message",             
            nil];
  
  if ([FBSession.activeSession.permissions indexOfObject:FacebookPermission_3] == NSNotFound) {
      NSLog(@"permission not found");
      // No permissions found in session, ask for it
      [FBSession.activeSession reauthorizeWithPublishPermissions:[NSArray arrayWithObjects:FacebookPermission_1, FacebookPermission_3, nil] defaultAudience:FBSessionDefaultAudienceFriends completionHandler:^(FBSession *session, NSError *error)
       {
           // If permissions granted, publish the story
           if (!error) [self initPostFacebookWithParams:params];
       }];
  } else {
      [self initPostFacebookWithParams:params];
  } } 
  
  - (void)initPostFacebookWithParams:(NSMutableDictionary *)params {
  
  [FBRequestConnection startWithGraphPath:@"me/photos" parameters:params HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
      NSLog(@"ERROR : %@", error.localizedDescription);
      if (!error) {
          NSLog(@"Facebook Post Success..");
          if (ok &amp;&amp; curView) {
              [curView performSelector:ok];
          }
  
  
      } else {
          NSLog(@"Facebook Post Failed..");
          if (ng &amp;&amp; curView) {
              [curView performSelector:ng withObject:error];
          }
  
      }
  
  }]; }
  </code></pre>
  
  <p>I appreciate your fast response and help! Thank You!!</p>