Module: FbGraph2::Edge::Friends

Included in:
User
Defined in:
lib/fb_graph2/edge/friends.rb

Instance Method Summary collapse

Instance Method Details

#friend?(user, params = {}) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
# File 'lib/fb_graph2/edge/friends.rb', line 11

def friend?(user, params = {})
  users = self.edge :friends, params, edge_scope: user
  users.present?
end

#friends(params = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/fb_graph2/edge/friends.rb', line 4

def friends(params = {})
  users = self.edge :friends, params
  users.collect! do |user|
    User.new(user[:id], user).authenticate self.access_token
  end
end