Module: FbGraph::Connections::Permissions

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

Instance Method Summary collapse

Instance Method Details

#permissions(options = {}) ⇒ Object



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

def permissions(options = {})
  self.connection(:permissions, options).first.try(:inject, []) do |arr, (key, value)|
    arr << key.to_sym if value.to_i == 1
    arr
  end || []
end

#revoke!(permission = nil, options = {}) ⇒ Object



11
12
13
# File 'lib/fb_graph/connections/permissions.rb', line 11

def revoke!(permission = nil, options = {})
  destroy options.merge(:permission => permission, :connection => :permissions)
end