Sha256: 33becddcfcf9c02b71cb9e248ecdd3ad52db4e12f668c4dff494d3265f5e9983

Contents?: true

Size: 610 Bytes

Versions: 4

Compression:

Stored size: 610 Bytes

Contents

module FbGraph
  module Connections
    module Feed
      def feed(options = {})
        posts = FbGraph::Collection.new(get(options.merge(:connection => 'feed')))
        posts.map! do |post|
          Post.new(post.delete(:id), post.merge(
            :access_token => options[:access_token] || self.access_token
          ))
        end
      end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fb_graph-0.4.2 lib/fb_graph/connections/feed.rb
fb_graph-0.4.1 lib/fb_graph/connections/feed.rb
fb_graph-0.4.0 lib/fb_graph/connections/feed.rb
fb_graph-0.3.0 lib/fb_graph/connections/feed.rb