graph = Facebook::GraphAPI.new(oauth_access_token) profile = graph.get_object("me") friends = graph.get_connections("me", "friends") graph.put_object("me", "feed", :message => "I am writing on my wall!")
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.