Module: FbGraph::OpenGraph::UserContext

Included in:
User
Defined in:
lib/fb_graph/open_graph/user_context.rb

Instance Method Summary collapse

Instance Method Details

#og_action!(action, options = {}) ⇒ Object



13
14
15
16
17
18
# File 'lib/fb_graph/open_graph/user_context.rb', line 13

def og_action!(action, options = {})
  action = post options.merge(:connection => action)
  Action.new action[:id], action.merge(
    :access_token => options[:access_token] || self.access_token
  )
end

#og_actions(action, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/fb_graph/open_graph/user_context.rb', line 4

def og_actions(action, options = {})
  actions = self.connection(action, options)
  actions.map! do |_action_|
    Action.new _action_[:id], _action_.merge(
      :access_token => options[:access_token] || self.access_token
    )
  end
end