Sha256: 30072a0925617a5ed646de5c206439a5d142fd45c2ec6b45e79113991a1a3bf3

Contents?: true

Size: 841 Bytes

Versions: 16

Compression:

Stored size: 841 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

      def reply!(options = {})
        comment_id = post options.merge(:connection => :comments)
        Comment.new comment_id, options.merge(
          :access_token => options[:access_token] || self.access_token
        )
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fb_graph-2.7.17 lib/fb_graph/connections/comments.rb
fb_graph-2.7.16 lib/fb_graph/connections/comments.rb
fb_graph-2.7.15 lib/fb_graph/connections/comments.rb
fb_graph-2.7.14 lib/fb_graph/connections/comments.rb
fb_graph-2.7.13 lib/fb_graph/connections/comments.rb
fb_graph-2.7.12 lib/fb_graph/connections/comments.rb
fb_graph-2.7.11 lib/fb_graph/connections/comments.rb
fb_graph-2.7.10 lib/fb_graph/connections/comments.rb
fb_graph-2.7.9 lib/fb_graph/connections/comments.rb
fb_graph-2.7.8 lib/fb_graph/connections/comments.rb
fb_graph-2.7.7 lib/fb_graph/connections/comments.rb
fb_graph-2.7.6 lib/fb_graph/connections/comments.rb
fb_graph-2.7.5 lib/fb_graph/connections/comments.rb
fb_graph-2.7.4 lib/fb_graph/connections/comments.rb
fb_graph-2.7.3 lib/fb_graph/connections/comments.rb
fb_graph-2.7.2 lib/fb_graph/connections/comments.rb