How to get all the photos when using PhotoSearch

Topics: Developer Forum, Project Management Forum, User Forum
Jul 8, 2010 at 1:34 PM
Edited Jul 8, 2010 at 1:36 PM

I want to get all the photos when searching tags with “microsoft” using the following piece of code:

     option.Tags = "microsoft";
     option.PerPage = 100;
     option.Extras = PhotoSearchExtras.All;
     PhotoCollection photos = flickr.PhotosSearch(option);

     for( int i = 0; i < photos.Count; i++ )
     {
                //balabala...
     }

 

But this only return 100 pics, even if i set option.PerPage to 1000, it returns at most 500 pics.

My question is: is there any methods like flickr.GetNextPage(), thus i can get the following pages of the search result?

 

 

 

Coordinator
Jul 8, 2010 at 2:03 PM
You just need to set the Page property and keep searching, as it mentions in the examples page: http://flickrnet.codeplex.com/wikipage?title=ExampleGettingMoreThanOnePage&referringTitle=Examples

It might help if you got to know the actual Flickr API a bit better, as this is made clear in the Flickr API pages.

Also note that the Flickr API will start returning duplicate responses after about the first 4000 images if you are using the flickr.photos.search method.

Sam