class FacebookGraph
Constants
- FB_GRAPH_URL
Public Class Methods
new(access_token = nil, options = {})
click to toggle source
# File lib/fbauth/graph.rb, line 9 def initialize(access_token = nil, options = {}) @options = options.merge({ :access_token => access_token }) end
Public Instance Methods
call(path, options = {})
click to toggle source
Generic Graph call to lookup data for any path
# File lib/fbauth/graph.rb, line 14 def call(path, options = {}) get "#{FB_GRAPH_URL}/#{path}", merged_options(options) end
publish_to_member_feed(uid, options)
click to toggle source
Post item to member’s wall
Available options: message, picture, link, name, caption, description
# File lib/fbauth/graph.rb, line 20 def publish_to_member_feed(uid, options) raise "access_token required" unless has_access_token?(options) if %w{staging production}.include? Rails.env post "#{FB_GRAPH_URL}/#{uid}/feed", merged_options(options) end end