Module: FbGraph::Connections::Outbox

Included in:
User
Defined in:
lib/fb_graph/connections/outbox.rb

Instance Method Summary collapse

Instance Method Details

#outbox(options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/fb_graph/connections/outbox.rb', line 4

def outbox(options = {})
  threads = self.connection :outbox, options
  threads.map! do |thread|
    if thread[:comments]
      Thread::BeforeTransition.new thread[:id], thread.merge(
        :access_token => options[:access_token] || self.access_token
      )
    else
      Thread.new thread[:id], thread.merge(
        :access_token => options[:access_token] || self.access_token
      )
    end
  end
end