Search code examples
asp.netflickr

Flickr get latest photos ASP using API


Hey I am currently using the following code

Dim flickr As New Flickr("apikey")

Dim test As New Photos
test = flickr.PhotosGetRecent(5, 5)

For Each [Photo] As FlickrNet.Photo In test.PhotoCollection
    Response.Write([Photo].ThumbnailUrl)
    Response.Write("<br>")
Next

But this only returns the Most Recent photos uploaded to flick in General, I only want my own ones. Is this possible ?

Thanks


Solution

  • Yes. You have you use PhotosSearch instead, and sort by DateUploaded.

    Dim flickr As New Flickr("apikey")
    
    Dim options As New PhotoSearchOptions()
    options.UserId = "myuserid@n01"
    o.SortOrder = PhotoSearchSortOrder.DatePostedDescending
    o.PerPage = 5
    o.Page = 1
    
    Dim test As Photos = flickr.PhotosSearch(options)
    
    ... etc