Module: FbGraph::Connections::Accounts

Included in:
Application, User
Defined in:
lib/fb_graph/connections/accounts.rb

Instance Method Summary collapse

Instance Method Details

#accounts(options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/fb_graph/connections/accounts.rb', line 4

def accounts(options = {})
  accounts = self.connection :accounts, options
  accounts.map! do ||
    [:access_token] ||= options[:access_token] || self.access_token
    case self
    when User
      if [:category] == 'Application'
        .delete(:category)
        Application.new [:id], 
      else
        Page.new [:id], 
      end
    when Application
      TestUser.new [:id], 
    end
  end
end