Search by multiple tags

Topics: Developer Forum
Feb 17, 2007 at 12: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;
else
return photos.PhotoCollection;
}
Coordinator
Feb 17, 2007 at 8: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.

http://www.flickr.com/services/api/flickr.photos.search.html