This project has moved. For the latest updates, please go here.

Get ID of most recent photo set

Topics: Developer Forum, User Forum
Oct 11, 2013 at 1:39 AM
Hi there, I'm trying to get the ID of the most recent photo set. This is what I've tried but haven't gotten it to work.

Dim flickrKey As String = "xxxxxxxxxxxxxxxxxxxxxxx"
Dim sharedSecret As String = "xxxxxxxxxxxx"
Dim userid as String = "xxxxxxxxxxxxxxxx"
Dim setID as String

Protected Sub Page_Load(sender As Object, e As EventArgs)
Dim flickr As New Flickr(flickrKey, sharedSecret)
Dim PhotoSetList = flickr.PhotosetsGetList(userid)
setID = photoSetID

Dim PhotosetPhotoCollection = flickr.PhotosetsGetPhotos(setid)  

ThumbnailsList.DataSource = PhotosetPhotoCollection
End Sub

I know that setID = photoSetID is incorrect but I'm not sure how to go about that. Thanks for your help!
Oct 11, 2013 at 10:11 AM
Edited Oct 11, 2013 at 10:12 AM
Photosets aren't ordered by most recent, so I'm not sure what you are after.

PhotoSetList is a collection, so you could get the first one, or the last one (using Linq perhaps? e.g. PhotoSetList.First().PhotosetId)

Oct 11, 2013 at 3:20 PM
Thanks Sam, that's exactly what I was looking for.