Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

This branch is 11 commits ahead, 857 commits behind arsduo:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Facebook Graph

This Ruby client library is designed to support the Facebook Graph API and the official Facebook JavaScript SDK, which is the canonical way to implement Facebook authentication. You can read more about the Graph API at

Basic usage:

graph =
profile = graph.get_object("me")
friends = graph.get_connections("me", "friends")
graph.put_object("me", "feed", :message => "I am writing on my wall!")

If you are using the module within a web application with the JavaScript SDK, you can also use the module to use Facebook for login, parsing the cookie set by the JavaScript SDK for logged in users.


Unit tests are provided for Graph API methods. However, because the Graph API uses access tokens, which expire, you have to provide your own token with stream publishing permissions for the tests. Insert the token value into the file test/fixtures/access_token, then run the test as follows: spec facebook_tests.rb

Unit tests for cookie validation will be provided shortly.

Something went wrong with that request. Please try again.