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 3 years ago


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.97) 36 reviews

United Arab Emirates
Dubai 07:37 AM

61 Jobs Posted
61% Hire Rate, 1 Open Job

Over $40,000 Total Spent
57 Hires, 3 Active

$51.64/hr Avg Hourly Rate Paid
1,048 Hours

Member Since Sep 26, 2011