Module: GSGraph::Connections::Likes

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

Defined Under Namespace

Modules: Likable

Instance Method Summary collapse

Instance Method Details

#likes(options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/gs_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