Flickr API
- October 19th, 2009
- By David
- Write comment
It’s been on my mind for a while, got it partially implemented a couple weeks back, and today I finally finished it: my Flickr pics on my homepage.
I recently decided to make Flickr the primary place I upload personal photos. Facebook used to be the primary place to upload, but frankly, I’d rather have people going to my website than Facebook for my activity, and I’m not interested in being in front of people constantly, if much at all. Where better to not be noticed than on your own site.
One day I got a wild hair to start a picture-a-day project on Flickr called “365″. That restarted my interest in showing the pictures on my site. And I just enjoy playing with API’s. Especially well-done ones like Flickr’s.
To get the pics showing, a cron job runs every night that uses the Flickr API to build a javascript file that my homepage calls whenever people visit. The response from the API takes too long to tie it directly to my website; best to have a little static file just ready to go whenever. So there’s a javascript data file made every night, then a javascript controller and CSS for the web page that puts it all together. And the jQuery library eases the javascript code as usual.
I’d imagine this is the most sensible approach. If you have a better way, please tell me in the comments here.
It would be nice to incorporate a “Set” selector someday. Good enough for now.

