title: tumblr iphone integration
body: <p>Hi i have done with status update in tumbler but i am facing problem when i am sending photo in the form of data, as shown below.</p>
  
  <pre><code>-(IBAction)sendPhoto
  {
      NSString *email           = @"user_name@gmail.com";
      NSString *password        = @"password";
      NSString *sendType = @"photo";
  
      UIImage *imageMS = [UIImage imageNamed:@"Submit.png"];
      NSData *photoData = [[NSData alloc] initWithData:UIImagePNGRepresentation(imageMS)];
  
      NSMutableURLRequest *request = [[NSMutableURLRequest alloc]
                                  initWithURL:[NSURL URLWithString:@"http://www.tumblr.com/api/write"]];
      [request setHTTPMethod:@"POST"];
      NSString *request_body = [NSString 
              stringWithFormat:@"email=%@&amp;password=%@&amp;type=%@&amp;data=%@",
              [email           stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
              [password        stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
              [sendType        stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
              photoData];
      [request setHTTPBody:[request_body dataUsingEncoding:NSUTF8StringEncoding]];
      [web loadRequest:request];
  }
  </code></pre>
  
  <p>But it is not getting updated. Why?</p>