Objectiveflickr set properties, more than one call
Posted
by user295944
on Stack Overflow
See other posts from Stack Overflow
or by user295944
Published on 2010-03-22T03:06:35Z
Indexed on
2010/03/22
3:11 UTC
Read the original article
Hit count: 373
iphone-sdk
|flickr-api
I cant to set Meta and set Location in ObjectiveFlickr
if I do only one it works fine, but if I do both it only does the first one
- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest didCompleteWithResponse:(NSDictionary *)inResponseDictionary
{ NSLog(@"%s %@ %@", PRETTY_FUNCTION, inRequest.sessionInfo, inResponseDictionary);
if (inRequest.sessionInfo == kUploadImageStep) {
snapPictureDescriptionLabel.text = @"Setting properties...";
NSLog(@"%@", inResponseDictionary);
NSString *photoID = [[inResponseDictionary valueForKeyPath:@"photoid"] textContent];
flickrRequest.sessionInfo = kSetImagePropertiesStep;
[flickrRequest callAPIMethodWithPOST:@"flickr.photos.setMeta" arguments:[NSDictionary dictionaryWithObjectsAndKeys:photoID, @"photo_id", @"Snap and Run", @"title", @"Uploaded from my iPhone/iPod Touch", @"description", nil]];
flickrRequest.sessionInfo = kSetImagePropertiesStep;
[flickrRequest callAPIMethodWithPOST:@"flickr.photos.geo.setLocation" arguments:[NSDictionary dictionaryWithObjectsAndKeys:photoID, @"photo_id",@"34" ,@"lat",@"-118",@"lon", nil]];
}
else if (inRequest.sessionInfo == kSetImagePropertiesStep) {
[self updateUserInterface:nil];
snapPictureDescriptionLabel.text = @"Done";
[UIApplication sharedApplication].idleTimerDisabled = NO;
}
}
© Stack Overflow or respective owner