Using phpFlickr to Integrate Flickr Photos on Your Own Site

Written By: Jay

- 21 Oct 2006 -
















Description: In this tutorial I will explain how to use the phpFlickr API to interact with Flickr and display photos on a web site.

  1. Summary and Requirements
  2. History
  3. Getting Started
  4. How Does This Work
  5. On Your Own

Over the past couple of weeks I have been working with the class that interfaces with the . Intergrating with Flickr is part of a side-project that I have going which is to create a single site to display del.icio.us links, Flickr photos, Google office docs and other social networking stuff.

Any how I stumbled upon the phpFlickr class and have been hacking away at a fully integrated photo site to display my Flickr photos. Now don't get too excited because the photos I have are mostly just my daughter (Yes, to those of you without kids this is a little weird but I assure you it's perfectly normal).

As always I started out with a grand plan to write the ultimate howto guide to the phpFlickr class and so far it's going well but I am reaching a point that it's just too much information for me to cover. So as a compromise I am posting the source code with some instructions so that others can use the code and hack at it themselves.

Summary

In this tutorial I will explain how to use the phpFlickr API to interact with Flickr and display photos on your own site. phpFlickr is a class that wraps up the Flickr API in a nice well though out package for a PHP developer to work with. It was developed by Dan Coulter and a million thanks go out to him for creating this and giving it away to the rest of us hacks.

The end result is a single php page that displays your Flickr Photo Sets and individual photos on your own site. The code is pretty simple and the most complex part is working with the PHP Object and extracing the correct items and then wrapping them in some HTML. The script works in 3 stages:

  1. Initial view of the primary photo from each photoset
  2. All of the photos from a single photo set
  3. A slide show of a single photoset using Lightbox JS

Requirments

Next >>