Module: FbGraph::Connections::Feed

Included in:
Event, Group, Page, User
Defined in:
lib/fb_graph/connections/feed.rb

Instance Method Summary collapse

Instance Method Details

#feed(options = {}) ⇒ Object



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

def feed(options = {})
  posts = self.connection :feed, options
  posts.map! do |post|
    Post.new post[:id], post.merge(
      :context => self.class,
      :access_token => options[:access_token] || self.access_token
    )
  end
end

#feed!(options = {}) ⇒ Object



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

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