Sha256: 84c05f972619179af06b31bf868ced6c4c13db07a6ea28c93778eff68f597a4d

Contents?: true

Size: 609 Bytes

Versions: 4

Compression:

Stored size: 609 Bytes

Contents

module FbGraph
  module Connections
    module Comments
      def comments(options = {})
        comments = self.connection(:comments, options)
        comments.map! do |comment|
          Comment.new(comment[:id], comment.merge(
            :access_token => options[:access_token] || self.access_token
          ))
        end
      end

      def comment!(options = {})
        comment = post(options.merge(:connection => :comments))
        Comment.new(comment[:id], options.merge(comment).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-2.2.6 lib/fb_graph/connections/comments.rb
fb_graph-2.2.5 lib/fb_graph/connections/comments.rb
fb_graph-2.2.4 lib/fb_graph/connections/comments.rb
fb_graph-2.2.3 lib/fb_graph/connections/comments.rb