Get Photo By Id?

Topics: Developer Forum, User Forum
Dec 1, 2008 at 5:49 PM
Hi,

I'm trying to retrive a photo base don my username and Id, is there a function that supports this?

Thanks

Pino
Coordinator
Dec 1, 2008 at 8:32 PM
Sure do. Just use the Flickr.PhotosSearch, and specify the UserId on the PhotosSearchOptions parameter.
Dec 2, 2008 at 8:28 AM
Hi Sam,

Yes that makes sense, where do I pass the photo Id though?
Coordinator
Dec 2, 2008 at 8:44 AM
If you have the photo id you don't need to know the user, you can just call Flickr.PhotosGetInfo. I thought you meant the user ID.
Dec 2, 2008 at 8:53 AM
Thanks Sam, I assumed the Photo Id was only unique to the User.

That should dop the trick though, thanks :)
Dec 2, 2008 at 10:16 AM
Hi Sam, Ok here is my code below. I'm passing the Image Id which looks like, 3074934294 into the function but keep getting the following error. I've looked on flickr and the id seems to match ok.

Any sugestions?

 try
            {
                FlickrNet.Flickr flickrO = new FlickrNet.Flickr();

                FlickrNet.Photoset curPhoto = flickrO.PhotosetsGetInfo("3074934294");

                this.ltArticles.Text += "<img src='" + curPhoto.PhotosetSquareThumbnailUrl + "' />";
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message + curMedia.MediaData);
            }
Coordinator
Dec 2, 2008 at 10:40 AM
You want PhotosGetInfo, not PhotosetsGetInfo.