Tutorial: Flickr Photo Gallery

2 Comments

This demo shows you how to retrieve today’s top rated photos from Flickr as the most recent uploads using jQuery and phpFlickr.

2 Comments (+add yours?)

  1. Vicky
    Jan 21, 2009 @ 13:30:55

    Hi, this looks fantastic. Thank you for going into so much detail with it. I was actually looking for code which would pull in photos from a particular gallery which I uploaded to Flickr. Is there a way to adapt this script to do that?

  2. claude
    Jan 21, 2009 @ 17:45:47

    Vicki, I am glad you found this tutorial helpful.

    The short answer is that you can use the photosets_getPhotos() method, which will accept a photosetid.

    In proxy.php, replace the line:

    $f->photos_getRecent( null, $_perPage, 1 )

    with:

    $f->photosets_getPhotos(photosetid, null, null, $_perPage);

    and make sure to pass in a valid photosetid. You can look it up by visiting a public photoset like this one of mine, and extracting the ID from the URL. In this case 72157612712643487.

    I hope this helps.

Leave a Reply