Sha256: 9a27b318f06b658d9df9824f43abe68739e38ca039e4b5909632f21e8fe3ff1d
Contents?: true
Size: 1.09 KB
Versions: 30
Compression:
Stored size: 1.09 KB
Contents
module FbGraph module Connections module Comments def comments(options = {}) comments = if @_comments_ && options.blank? self.connection(:comments, options.merge(:cached_collection => @_comments_)) else self.connection(:comments, options) end 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 # NOTE: # the context of getting likes is User, but the context of posting like is not user. # posting like is always in same context with comment! def like!(options = {}) post(options.merge(:connection => :likes)) end def unlike!(options = {}) destroy(options.merge(:connection => :likes)) end end end end
Version data entries
30 entries across 30 versions & 1 rubygems