Sha256: 3654b2cab7d64d83d398c049a28b06ac410910e6bfde51e8d8d7c33f26b7b375
Contents?: true
Size: 1.11 KB
Versions: 42
Compression:
Stored size: 1.11 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.delete(: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.delete(: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
42 entries across 42 versions & 1 rubygems