Module: FbGraph::Connections::UserLikes

Included in:
User
Defined in:
lib/fb_graph/connections/user_likes.rb

Instance Method Summary collapse

Instance Method Details

#like?(page, options = {}) ⇒ Boolean

Returns:

  • (Boolean)

13
14
15
16
# File 'lib/fb_graph/connections/user_likes.rb', line 13

def like?(page, options = {})
  like = self.connection :likes, options.merge(:connection_scope => page.identifier)
  like.present?
end

#likes(options = {}) ⇒ Object


4
5
6
7
8
9
10
11
# File 'lib/fb_graph/connections/user_likes.rb', line 4

def likes(options = {})
  likes = self.connection :likes, options
  likes.map! do |like|
    Page.new like[:id], like.merge(
      :access_token => options[:access_token] || self.access_token
    )
  end
end