Module: FbGraph::Connections::Comments
- Included in:
- Album, FbGraph::Checkin, Link, Note, OpenGraph::Action, Photo, Post, Status, UserAchievement, Video
- Defined in:
- lib/fb_graph/connections/comments.rb
Instance Method Summary collapse
Instance Method Details
#comment!(options = {}) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/fb_graph/connections/comments.rb', line 17 def comment!( = {}) comment = post(.merge(:connection => :comments)) Comment.new(comment[:id], .merge(comment).merge( :access_token => [:access_token] || self.access_token )) end |
#comments(options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/fb_graph/connections/comments.rb', line 4 def comments( = {}) comments = if @_comments_ && .blank? self.connection(:comments, .merge(:cached_collection => @_comments_)) else self.connection(:comments, ) end comments.map! do |comment| Comment.new(comment[:id], comment.merge( :access_token => [:access_token] || self.access_token )) end end |