Module: FbGraph2::Edge::Admins

Included in:
Page
Defined in:
lib/fb_graph2/edge/admins.rb

Instance Method Summary collapse

Instance Method Details

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

Returns:

  • (Boolean)


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

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

#admins(params = {}) ⇒ Object



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

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