Using the Flickr API to retrieve a list of photosets

Oct 10, 2007

Lots of good work has been done on the Flickr API with ColdFusion already: specifically, CFlickr - see http://chris.m0nk3y.net/projects/CFlickr/.

However, for my uses, I didn't need anything near as complicated: All I wanted to do was to pull a list of photosets, their titles, primary thumbnail and description.

Thankfully, this is quite easy due to the Flickr API.

Part One: Making the request to Flickr

I'm assuming you have an API code, and know your userID:

Part Two: Output: I've got my XML data, and now just need to loop over the Array.

And that's it: I've cached the XML data in the Application scope for speed, and I'm looping over the XML data object. If a description exists for the set, it's output.

Comments

frustrated

frustrated wrote on 06/01/11 3:24 PM

Great color scheme, I can barely read the code on this page.
Tom K

Tom K wrote on 06/01/11 3:30 PM

Sorry about that - the code colouring was using an old version of the plugin before I redesigned this blog. Now using github gists - should be clearer. In fairness, this post is 3 and a half years old...

Write your comment



(it will not be displayed)





About Tom

Tom is the author of this blog and the brains behind OxAlto Design More ...

Categories

Monthly Archives

Links

Tag Cloud

coldfusion web-development internet misc music cfwheels railo drupal vps chchchoir blueprintcss jquery mangoblog flex ipod mac wowza demos flash flickr google hinkseystudio itunesu wallpapers wordpress

Feeds