开发者

Flickr get latest photos ASP using API

开发者 https://www.devze.com 2023-02-11 03:24 出处:网络
Hey I am currently using the following code Dim flickr As New Flickr(\"apikey\") Dim test As New Photos

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 Fl开发者_StackOverflowickrNet.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


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
0

精彩评论

暂无评论...
验证码 换一张
取 消