Search For Tags In A PhotoSet

Topics: Developer Forum
Mar 14, 2008 at 6:03 AM

I'm trying to search for photos in a specific photoset that match a particular tag.

Rough idea - iterate through the photoset, collecting all tags for each photo into an arraylist - cycle through arraylist and see if any of the tags match the required tag.

Any better ideas?

Mar 14, 2008 at 10:30 AM
You can request Tags as part of the PhotosSearchExtras passed into PhotosetsGetPhotos.
Mar 15, 2008 at 5:46 AM
Do you mean that I can define the tags that I need (the search) and then pass these into PhotosetsGetPhotos(setid, flickrnet.photosearchextras)?

Could you briefly outline how I would do this?

Appreciate your help on this.

Mar 24, 2008 at 6:16 PM
No, you can request that tags are returned by the search:

Photoset ps = flickr.PhotosetGetPhotos(setid, PhotosSearchExtras.Tags);
foreach(Photo p in ps.PhotoCollection)
   string[] tags = p.Tags.Split(',');

or something like that.
Mar 27, 2008 at 3:51 AM
Thanks Sam - worked out exactly that in the end.

But originally I thought I could pass the tags that I wanted into PhotosetGetPhotos; filtering as I created the photoset.

Thanks again!