Sha256: df34abcff6eb62de802e229e7611644b0dab030c6d108b6a3a81112d12da98f0

Contents?: true

Size: 657 Bytes

Versions: 13

Compression:

Stored size: 657 Bytes

Contents

module FbGraph
  module Connections
    module Likes
      def likes(options = {})
        likes = if @_likes_ && options.blank?
          self.connection(:likes, options.merge(:cached_collection => @_likes_))
        else
          self.connection(:likes, options)
        end
        likes.map! do |like|
          like.merge!(
            :access_token => options[:access_token] || self.access_token
          )
          if like[:category]
            Page.new(like[:id], like)
          else
            User.new(like[:id], like)
          end
        end
      end

      # NOTE: likes! is defined in fb_graph/connections/comments.rb
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fb_graph-2.0.0.alpha lib/fb_graph/connections/likes.rb
fb_graph-1.9.5 lib/fb_graph/connections/likes.rb
fb_graph-1.9.4 lib/fb_graph/connections/likes.rb
fb_graph-1.9.3 lib/fb_graph/connections/likes.rb
fb_graph-1.9.2 lib/fb_graph/connections/likes.rb
fb_graph-1.9.1 lib/fb_graph/connections/likes.rb
fb_graph-1.9.0 lib/fb_graph/connections/likes.rb
fb_graph-1.8.6 lib/fb_graph/connections/likes.rb
fb_graph-1.8.5 lib/fb_graph/connections/likes.rb
fb_graph-1.8.4 lib/fb_graph/connections/likes.rb
fb_graph-1.8.3 lib/fb_graph/connections/likes.rb
fb_graph-1.8.2 lib/fb_graph/connections/likes.rb
fb_graph-1.8.1 lib/fb_graph/connections/likes.rb