Search code examples
.netflickr

Flickr API .NET: Creative Commons License Search returns "All Rights Reserved" images?


I'm using the official .NET wrapper for Flickr's API. When I do a search for photos of freely usable pictures as shown in the following code snippet, I get back 3 photos whose licenses print out a "All Rights Reserved":

        Flickr flickr = new Flickr(Settings.Default.fli_key);
        PhotoSearchOptions options = new PhotoSearchOptions();
        options.Tags = "start";
        options.IsCommons = true;
        options.Licenses.Add(LicenseType.UnitedStatesGovernmentWork);
        options.Licenses.Add(LicenseType.NoKnownCopyrightRestrictions);
        PhotoCollection photos = flickr.PhotosSearch(options);
        int i = 0;

        foreach (var photo in photos)
        {
            Console.WriteLine(i + ":" + photo.License);
            i++;
        }

Console:

0:AllRightsReserved
1:AllRightsReserved
2:AllRightsReserved

Questions:

  • What am I doing wrong?
  • If I'm not doing anything wrong, what is the problem here? Is the .NET library broken?
  • What can I do to fix the issue? I really only want pictures of the requested licenses.

I appreciate your help :-)


Solution

  • Was having the same issue with PHP until I removed the 'is_commons' parameter from my call and searched only by license id (license=2). Now all my responses are the requested license type. Perhaps is_commons trumps license or they conflict? Dunno, I just got started with the API. Hope this helps.