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

how to get photosetId and photoId

Topics: Developer Forum, User Forum
Jan 14, 2011 at 9:30 AM
Edited Jan 14, 2011 at 9:32 AM

i have done with the photoset With(add, edit, delete) photo , the parameters with the Api i want to know how to calculate the photosetId and photoId every time i am passing hardcode id as a parameter  for that, is there any other way without hard code, how can we calculate that..please help me out.

suppose in the below example i am giving hard coded photosetId but in real programming it is not good to give hard code  so how to calculate it and same with the photoId..


PhotosetPhotoCollection photos = myFlickr.PhotosetsGetPhotos("72157625681762281");

             foreach(Photo photo in photos)
Jan 14, 2011 at 11:17 AM

I don't understand what you mean by 'calculate it'. Calculate it from what?


Jan 14, 2011 at 11:31 AM

i mean to say how to get the photosetId

Jan 14, 2011 at 11:33 AM

You can call PhotosetsGetList to get a list of photosets. Other than that I'm not sure what you mean.


Jan 14, 2011 at 11:41 AM

i mean to say the one argument of PhotosetsGetPhotos(string photosetId)

that is what i want to know how to get the photosetId

Jan 14, 2011 at 11:52 AM

I still don't understand what you mean. You either have to get the user to pick photoset from a list (i.e. use PhotosetsGetList to return a list of photosets) or you can get the ID from url of the photoset. 

If that doesn't answer your question then I don't think I can.


Jan 14, 2011 at 12:36 PM
Edited Jan 14, 2011 at 1:38 PM

Hi Sam

i have taken that id from the url of Photoset but suppose if i have hosted that application and suppose my friend is using that application but when he will run that app he will get an error becoz he is going to use his user name and password for flickr account then the photoseId will mismatch becoz i have written phtosetId  "72157625681762281" as an argument (PhotosetsGetPhotos(string photosetId) )i think this time you are able to understand my problem...

Jan 14, 2011 at 1:33 PM

Well your 'friend' either needs to enter the URL or ID of the photoset they want to see the photos for manually, or as I've already said twice use PhotosetsGetList to display a drop down list of all their photosets.