Module: FbGraph::Connections::Likes

Included in:
Album, FbGraph::Checkin, FbGraph::Comment, Link, Note, OpenGraph::Action, Page, Photo, Post, Status, User, UserAchievement, Video
Defined in:
lib/fb_graph/connections/likes.rb

Defined Under Namespace

Modules: Likable

Instance Method Summary (collapse)

Instance Method Details

- (Object) likes(options = {})



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/fb_graph/connections/likes.rb', line 4

def likes(options = {})
  likes = self.connection :likes, options
  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