This project has moved and is read-only. For the latest updates, please go here.

Search by multiple tags

Topics: Developer Forum
Feb 17, 2007 at 1:11 AM
I am trying to search by multiple tags, but I don't know how to format the input string. Should it be "word1 AND word2" or "word1 word2" or something else?

I use the following code:
public static FlickrNet.PhotoCollection GetFlickrPhotos(string tags)
FlickrNet.Flickr flickr = new FlickrNet.Flickr();
FlickrNet.PhotoSearchOptions options = new FlickrNet.PhotoSearchOptions();
options.Tags = tags;
options.PerPage = 20;
options.Page = 1;
options.SortOrder = FlickrNet.PhotoSearchSortOrder.DatePostedDesc;

FlickrNet.Photos photos = flickr.PhotosSearch(options);

if (photos.PhotoCollection == null)
return new FlickrNet.Photo0;
return photos.PhotoCollection;
Feb 17, 2007 at 9:17 AM
The tags should be seperated by commas. If you're ever in doubt, then just check the Flickr API documentation for the function.