[thelist] Tip: Flickr does JSON

Christian Heilmann codepo8 at gmail.com
Thu Aug 17 17:00:42 CDT 2006


I just realised that flickr does not only offer your photos as RSS:
http://flickr.com/services/feeds/photos_public.gne?id=11414938@N00&format=rss_200
but also as JSON
http://flickr.com/services/feeds/photos_public.gne?id=11414938@N00&format=json

While the format is a bit on the adventurous side, this means that you
can easily display your latest shots without having to resort to a
backend solution or Ajax with IFRAME trickery to avoid the
cross-domain issue. All you need to do is to create a SCRIPT tag on
the fly with the URL as the src and a callback function called
jsonFlickrFeed() which will retrieve the JSON object as a parameter.

I've done this and added some other bits and bobs, voila: Dynamic
Flickr badge without inline SCRIPT or other shenanigans:
http://icant.co.uk/sandbox/fjb/

-- 
Chris Heilmann
Book: http://www.beginningjavascript.com
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/



More information about the thelist mailing list