This project has moved and is read-only. For the latest updates, please go here.

Get Photo By Id?

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

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


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

Yes that makes sense, where do I pass the photo Id though?
Dec 2, 2008 at 9: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 9: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 11: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?

                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);
Dec 2, 2008 at 11:40 AM
You want PhotosGetInfo, not PhotosetsGetInfo.