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

Get ID of most recent photo set

Topics: Developer Forum, User Forum
Oct 11, 2013 at 2: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 11:11 AM
Edited Oct 11, 2013 at 11: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 4:20 PM
Thanks Sam, that's exactly what I was looking for.