Makes badges for flickr photo sets for inclusion on other websites.
Switch branches/tags
Nothing to show
Pull request Compare This branch is 7 commits behind lynnfaraday:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

================== Flickr Badge Maker

Flickr Badge Maker helps you make photo gallery "badges" of your Flickr photos, suitable for a blog or other website.

Install the GEM

Coming soon -- for now clone, build and install the gem locally.

This will give you access to the API in your own applications and also installs a client program that offers some handy commands.

Use the client

This runs the client program.


flickr_badge_maker configure

This will walk you through the oauth authentication process interactively. When it's finished, you will have a flickr_config.yaml file with all the authentication tokens needed to access your Flickr account via the application.

Photo Info

flickr_badge_maker info set=12345

This outputs the photo information for a given flickr photoset, so you can see what info you have at your disposal. For example:

:squarethumb_image_url => "",
      :thumb_image_url => "",
      :small_image_url => "",
        :med_image_url => "",
      :large_image_url => "",
       :orig_image_url => "",
              :caption => "I'm Ready for my Close Up",
                 :host => "Flickr",
             :view_url => ""

Note: Not all sizes are available on all images, depending on how they were uploaded. If a requested size is not available, flickr will return the URL of the next bigger size.

Simple Badge

flickr_badge_maker badge set=12345

This outputs the HTML for a very simple photo badge, just to show how the script can be used.

Use the API

Here is an example of how to use the gem's API in your application.

require 'flickr_badge_maker'
require 'yaml'

# Include the config.yaml file in your project and reference it like so.
# (or you can just hard-code the values)
config = YAML.load_file("flickr_config.yaml")
      :api_key => config["flickr"]["api_key"],
      :shared_secret => config["flickr"]["shared_secret"],
      :access_token => config["flickr"]["access_token"],
      :css_file => config["flickr"]["access_secret"]

 flickr_badge_maker =
 photos = flickr_badge_maker.get_photos(ENV['set'])
 photos.each { |p|  puts "<img src=\"#{p[:thumb_image_url]}\"/>" }

Disclaimers and Such

This code is free for all. Use it, modify it, whatever you like.

This code is provided AS IS, with no warranty.

This library requires you to get your own Flickr API key, which in turn subjects you to Flickr's rules for its use. Read their website for details.

Thinly wraps the Flickraw API. Thanks.