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

Last Uploaded Photo

Topics: Developer Forum
Dec 1, 2010 at 2:28 AM

I'm a little new to the API and not sure if I've overlooked something, but I essentially want to display the date of the last photo that was uploaded.  I notice the PhotosGetRecent, call, but that seems to pull from all flickr accounts...not just mine.  I've also looked into the PhotosRecentlyUpdated call, but that seems to return photos that may have had there title changed.

Is there a way to get just that last photo actually uploaded (which could be weeks ago) regardless of how photo titles have been changed in the last few days?  I do see a "Recent Upload" on my flickr homepage under Photostream (which doesn't seem to be altered by photos I've recently change the titles on).

Dec 1, 2010 at 8:41 AM

An authenticated call to PeopleGetPhotos (set UserId to "me" and PerPage to 1) would return the most recent photo for that user.

If you cannot authenticate the call then you could use PeopleGetPublicPhotos in the same manner (but you would need the specific user ID) but that would obviously only return public photos.

As a final alternative you can use PhotosSearch, and set the SortOrder to DatePostedDescending (or leave it blank as this is the default sort order).


Dec 7, 2010 at 11:39 PM

Thank you for your reply Sam. 

The first option you gave me requires a Token, which I have no idea how to get. :)  I was able to get the other two options to work, but they both return DateUploaded as "1/1/0001 12:00:00 AM" (DateTime.MinValue).  Are there any API calls that will actually return me the proper uploaded date?

Dec 8, 2010 at 8:00 AM

You'll need to add PhotoSearchExtras.DataUploaded to your 'extras' search parameters to get the uploaded date to be returned.