Note that there are some explanatory texts on larger screens.

plurals
  1. POProblems returning the correct pid from facebook.photos.upload in fbconnect for iPhone SDK
    text
    copied!<p>I am using facebook.photos.upload to upload photos direct from my application into facebook albums. This is my current code:-</p> <pre><code>NSMutableDictionary *args = [[[NSMutableDictionary alloc] init] autorelease]; [args setObject:self.facebookString forKey:@"caption"]; UIImage *image = ((iPhotoFitViewController*)self.cameraPickerController).photoImageView.image; [[FBRequest requestWithDelegate:self] call:@"facebook.photos.upload" params:args dataParam:(NSData*)image]; </code></pre> <p>This code works for the upload perfectly but i am having issues returning the true pid. This is my code for returning the pid as per facebook sample app example:-</p> <pre><code>- (void)request:(FBRequest*)request didLoad:(id)result { if ([request.method isEqualToString:@"facebook.photos.upload"]) { NSDictionary* photoInfo = result; NSString* pid = [photoInfo objectForKey:@"pid"]; _label.text = [NSString stringWithFormat:@"Uploaded with pid %@", pid]; NSLog(@"pid=%@",pid); } } </code></pre> <p>Now, after the upload has finished i get a response to my _label with a long string which is supposed to be the pid for the image. if i cross check this given pid with the actual pid on the photograph on the facebook website it is completely different and if i attempt to visit the photo using the returned pid the facebook site errors out with the no photo found error.</p> <p>This is also the same within the sample application found on github where the fbconnect for iPhone files are located.</p> <p>Any help on this would be greatly appreciated. Thanks in advance</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload