Photo gallery with Flickr API
2008/09/02
Actually, I also did it because I wanted to try some stuff with the flickr API. I already tried it for my gallery of Fixed Gear in Japan, but I wanted to go a little bit further to build a full gallery of albums feeded directly by Flickr. The advantage is first that the photos are hosted by them and then there are many tools to upload photos to flickr from a PC or a phone so we don't need to build a backend for the gallery!
Instead we can use the Flickr API to retrieve the necessary data to display the photos on the page like we want. So from server side, we just need an API key and then if we use Php, just do some stuff exactly like on this page : Php API Response.
For this little application I just used 3 functions :
- getList
- getPhotos
- getInfo
Onced we've collected the data, we need to display them in our view (the html page). For now I chose to use the Slimbox by Christophe Beyls, it's a lightbox clone for Mootools, a well known effect to display photos from thumbnails.
The next step will be to display not only the photos but also the comments associated to them in Flickr.
To do that, I'll use the photosets.comments functions from the API like addComment or getList. And for the view, to browse the photos from an album I'll use the iCarousel by Fabio Zendhi Nagao in order to save some space on the page.
This kind of stuff is really funny to build (well for me at least), it's like to play Lego : just put bricks together to make what we want!
--