Getting Photos that do not long to a PhotoSet

Topics: Developer Forum
Mar 21, 2007 at 9:38 AM
What is the correct way of retrieving the list of photos which are not assigned to any specific photo set?
Mar 21, 2007 at 10:50 AM
Edited Mar 23, 2007 at 12:17 PM
Mar 23, 2007 at 3:10 AM
Using Flickr.PhotosGetNotInSet, I'm getting the response of "Insufficient permissions. Method requires read privileges; none granted. (99)". But I don't have the same problem when I access photos from my photosets. I noticed that when retrieving photosets, I pass the auth.User.Userid:

FlickrNet.Photosets photoSets = flickr.PhotosetsGetList(auth.User.UserId);

But the flickr.PhotosGetNotInSet() does not seem to have such a parameter. How does it know what userid to use?
Mar 23, 2007 at 12:16 PM
You need to be authenticated to call the PhotosGetNotInSet, and it uses the user id of the authenticated user.

This is perhaps not totally clear from the flickr documentation, but thats what it means by 'your' photos.
Mar 23, 2007 at 2:07 PM
Hmm... I did go through the authentication process (the one where you get redirected to Yahoo to enter your userid/password; then get redirected back to the postback URL defined in your API settings) before calling PhotosGetNotInSet().
Mar 24, 2007 at 6:51 AM
Found the problem! Seems that I need to do something like:

Auth auth = flickr.AuthGetToken(frob);
flickr.AuthToken = auth.Token;

so that the authentication token will be stored to the 'flickr' object before I can call flickr.PhotosGetNotInSet(). I thought all along that the authentication tokens are already stored internally in the class during the AuthGetToken() call withtout the need for an explicit assignment.