RUBY - Facebook API - Download Photo Albums

Closed - This job posting has been filled and work has been completed.
Web, Mobile & Software Dev Scripts & Utilities Posted 2 years ago

Hourly Job

Hours to be determined
Less than 1 week


I have a facebook app that get's the user's "user_photos" permission.

I need a simple script that will download all pictures from all photo albums of a facebook user.
Preferably you will use this gem:

The script will be run like this:
ruby fb_download.rb HERE_THE_CODE

As you can see, I will pass the authorization code to the script as ARGV[0].

I did some work myself, see below:

require "rubygems"
require "fb_graph"

APP_ID = "..."
APP_SECRET = "...."
CODE = ARGV[0].strip # this is what Facebook will return after the user installs the App.. this is no access token

# Get Access Token:
fb_auth =, APP_SECRET)
client = fb_auth.client
client.redirect_uri = "..." # this must match 100% with the redirect_uri when the user installs the app

client.authorization_code = CODE
access_token = client.access_token! :client_auth_body

user =
user = user.fetch

# Download Albums
user.albums.each do |album| do |photo|
    # ???

About the Client

(4.99) 31 reviews

United Arab Emirates
Dubai 06:58 PM

58 Jobs Posted
59% Hire Rate, 1 Open Job

Over $30,000 Total Spent
47 Hires, 0 Active

$49.61/hr Avg Hourly Rate Paid
640 Hours

Member Since Sep 26, 2011