I’m a computer programmer who also loves photography and juggling! Feel free to ask me any questions.

Building a Simple Flickr App

I learned how to use the Flickr API and built a simple photo gallery app.

Flickr API

With the popularity of Facebook and Instagram these days, its easy to forget about Flickr. The classic photo sharing site is still robust. I continue to store many photographs on the service. Flickr gives you 1 terabyte of free storage, which is a ridiculous amount of space.

I wanted to build an app that could pull images from my Flickr account and post them on my blog. Luckily it was easy with the Flickr API.

The first thing I had to do was create a Flickr API Key. This can be done on the app garden page. The api key is really easy to get.

Next, I had to figure out how to get a list of my public photos. The endpoint for that is flickr.people.getPublicPhotos. This endpoint requires you to pass in the user_id, which is a little inconvenient. You should be able to just pass in the public username, which in my case is robinfhu. So the first thing I had to do was get my user_id, which can be found by hitting this endpoint:

Choosing Favorite Photos

Given that I have over 700 photos in my Flickr stream, I did not want to load all of them into my blog gallery. So how do I decide which photos to show?

I could have used tags, or put them into a special Flickr album. But the fastest way for me actually, was to change the image title to have the phrase [fave] in it. I then filter on all image titles that contain [fave] and only show those.

Hacky, but solved the issue for me!

Conclusion

This was a fun weekend project to learn more about the Flickr API. The API is very rich, and I’m sure with more time I could build something really cool!

Mandelbrot sets have fascinated me since I was 14. I traditionally wrote my own programs to generate the fractal. Today I decided to purchase Fractal XTreme, a professionally written program for Mandelbrot sets. It blew me away.