Module: FbGraph::Connections::TestUsers

Included in:
Application
Defined in:
lib/fb_graph/connections/test_users.rb

Instance Method Summary collapse

Instance Method Details

#test_user!(options = {}) ⇒ Object


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

def test_user!(options = {})
  options[:access_token] ||= self.access_token
  test_user = post options.merge(:connection => :accounts, :connection_scope => 'test-users')
  TestUser.new test_user[:id], test_user
end

#test_users(options = {}) ⇒ Object


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

def test_users(options = {})
  options[:access_token] ||= self.access_token
  test_users = self.connection :accounts, options.merge(:connection_scope => 'test-users')
  test_users.map! do |test_user|
    TestUser.new test_user[:id], test_user
  end
end