Module: FbGraph2::Edge::Feed

Included in:
FbGraph2::Event, Group, Page, User
Defined in:
lib/fb_graph2/edge/feed.rb

Instance Method Summary collapse

Instance Method Details

#feed(params = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/fb_graph2/edge/feed.rb', line 4

def feed(params = {})
  posts = self.edge :feed, params
  posts.collect! do |post|
    Post.new(post[:id], post).authenticate self.access_token
  end
end

#feed!(params = {}) ⇒ Object



11
12
13
14
# File 'lib/fb_graph2/edge/feed.rb', line 11

def feed!(params = {})
  post = self.post params, edge: :feed
  Post.new(post[:id], params.merge(post)).authenticate self.access_token
end