Module: FbGraph::Connections::Questions

Included in:
Page, User
Defined in:
lib/fb_graph/connections/questions.rb

Instance Method Summary collapse

Instance Method Details

#question!(options = {}) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/fb_graph/connections/questions.rb', line 13

def question!(options = {})
  question = post options.merge(:connection => :questions)
  Question.new question[:id], question.merge(
    :question => options[:question],
    :access_token => options[:access_token] || self.access_token
  )
end

#questions(options = {}) ⇒ Object



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

def questions(options = {})
  questions = self.connection :questions, options
  questions.map! do |question|
    Question.new question[:id], question.merge(
      :access_token => options[:access_token] || self.access_token
    )
  end
end