raushan shahi
unread,May 27, 2014, 5:39:04 AM5/27/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to objecti...@googlegroups.com
I am working on an application in which i upload images on flickr from mi iOS application . when i select images it will upload on flickr in photostream but i want my images in specific album.
when i create album and add images in that album only first image is added, with the help of "flickr.photosets.create" method.
When i try to add other images with the method "flickr.photosets.addPhoto" i am not getting any response from the method and my images from photo stream to the album is not moved pr copied.
Here is my code;
- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest didCompleteWithResponse:(NSDictionary *)inResponseDictionary
{
NSLog(@"%s %@ %@", __PRETTY_FUNCTION__, inRequest.sessionInfo, inResponseDictionary);
if (inRequest.sessionInfo == kUploadImageStep)
{
snapPictureDescriptionLabel.text = @"Setting properties...";
NSLog(@"%@", inResponseDictionary);
photoID = [[inResponseDictionary valueForKeyPath:@"photoid"] textContent];
flickrRequest.sessionInfo = kSetImagePropertiesStep;
[flickrRequest callAPIMethodWithPOST:@"flickr.photos.setMeta" arguments:[NSDictionary dictionaryWithObjectsAndKeys:photoID, @"photo_id", @"PicBackMan", @"title", @"Uploaded from my iPhone/iPod Touch", @"description", nil]];
[array addObject:photoID];
arr=array[0];
NSLog(@" counterflicker :%lu",(unsigned long)counterflicker);
}
else if (inRequest.sessionInfo == kSetImagePropertiesStep) {
[self updateUserInterface:nil];
// [self addphotostoPhotoset];
NSLog(@"in kimage set arr : %@",arr);
if(countere == (NSUInteger*)counterflicker)
{
if(MyStatic==1){
[self.flickrRequest callAPIMethodWithPOST:@"flickr.photosets.create" arguments:[NSDictionary dictionaryWithObjectsAndKeys:FLICKR_AUTH_TOKEN,@"api_key",albumNAME,@"title",arr,@"primary_photo_id",@"Uploaded from my iPhone/iPod Touch", @"description", nil]];
MyStatic++;
}
[self.flickrRequest callAPIMethodWithPOST:@"flickr.photosets.addPhoto" arguments:[NSDictionary dictionaryWithObjectsAndKeys:FLICKR_AUTH_TOKEN,@"api_key",photosetID,@"photoset_id",arr,@"photo_id",nil]];
[[[UIAlertView alloc] initWithTitle:@"Uploading Completed" message:@"Pics Uploaded on Flickr" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]show];
NSLog(@"photosetID After AWr %@",photosetID);
}
NSLog(@"outside%@",photosetID);(savingDone) withObject:nil waitUntilDone:YES];
}
mystatic is used for get count,How will i add images from Photostream to Album by using Photoset.
Please help me out.
raushan