"User not found (1)" - though existing in Flickr

Jul 19, 2012 at 8:22 AM

from my test code here

string response = string.Empty;

Flickr flickr = new Flickr("237423notmyrealflickrkeyrw2u");
PhotoSearchOptions searchOptions = new PhotoSearchOptions();
PhotoCollection photos = new PhotoCollection();

while (response != ".")
{
	Console.Write("Search: ");
	string search_term = Console.ReadLine();
	Console.Write("perpage: ");
	string perpage = Console.ReadLine();

	FoundUser found_user = flickr.PeopleFindByUserName(search_term);
	searchOptions.UserId = found_user.UserId;
	searchOptions.Tags = search_term.Trim();
	searchOptions.PerPage = Convert.ToInt32(perpage);
	searchOptions.SortOrder = PhotoSearchSortOrder.Relevance;

	Console.WriteLine("starting to search for '" + search_term + "' ...");
	photos = flickr.PhotosSearch(searchOptions);

	Console.WriteLine("found: " + photos.Count);

	Console.WriteLine("press '.' to quit");
	response = Console.ReadLine();
}

Console.WriteLine("test done");

I tried searching for "richebetspics" found in this link http://www.flickr.com/photos/richebetspics but it returned User not found (1) error on this line

FoundUser found_user = flickr.PeopleFindByUserName(search_term);

what you think is the problem?

Coordinator
Jul 19, 2012 at 8:38 AM

That user's username is "richebets'. 'richebetspics' is his url alias (and you could feed that into UrlsLookupUser if you wanted).

Sam

Jul 19, 2012 at 9:45 AM

Thanks Sam,

Kindly please include a sample of the UrlsLoopkupUser?

Coordinator
Jul 19, 2012 at 9:50 AM

Something like this:

string url = "http://www.flickr.com/photos/richebetspics";
FoundUser found_user = flickr.UrlsLookupUser(url);

Sam

Jul 19, 2012 at 11:00 AM

Greatly appreciate that!