facebook4j.api
Interface TestUserMethods

All Known Subinterfaces:
Facebook

public interface TestUserMethods

Author:
Ryuji Yamashita - roundrop at gmail.com

Method Summary
 TestUser createTestUser(String appId)
          Creates a test user associated with a particular app.
 TestUser createTestUser(String appId, String name, String locale, String permissions)
          Creates a test user associated with a particular app.
 TestUser createTestUser(String appId, String name, String locale, String permissions, boolean installed)
          Creates a test user associated with a particular app.
 boolean deleteTestUser(String testUserId)
          Deletes the test user.
 ResponseList<TestUser> getTestUsers(String appId)
          Returns test users associated with a particular app.
 ResponseList<TestUser> getTestUsers(String appId, Integer limit)
          Returns test users associated with a particular app.
 boolean makeFriendTestUser(TestUser testUser1, TestUser testUser2)
          Makes friends connections for a test user with other test users.
 

Method Detail

createTestUser

TestUser createTestUser(String appId)
                        throws FacebookException
Creates a test user associated with a particular app.

Parameters:
appId - the ID of the app
Returns:
Test User
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Test Users - Facebook Developers

createTestUser

TestUser createTestUser(String appId,
                        String name,
                        String locale,
                        String permissions)
                        throws FacebookException
Creates a test user associated with a particular app.

Parameters:
appId - the ID of the app
name - test user name
locale - locale
permissions - comma-separated list of permissions
Returns:
Test User
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Test Users - Facebook Developers

createTestUser

TestUser createTestUser(String appId,
                        String name,
                        String locale,
                        String permissions,
                        boolean installed)
                        throws FacebookException
Creates a test user associated with a particular app.

Parameters:
appId - the ID of the app
name - test user name
locale - locale
permissions - comma-separated list of permissions
installed - automatically installs the app for the test user once it is created
Returns:
Test User
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Test Users - Facebook Developers

getTestUsers

ResponseList<TestUser> getTestUsers(String appId)
                                    throws FacebookException
Returns test users associated with a particular app. This method can't manage paging

Parameters:
appId - the ID of the app
Returns:
Test Users
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Test Users - Facebook Developers

getTestUsers

ResponseList<TestUser> getTestUsers(String appId,
                                    Integer limit)
                                    throws FacebookException
Returns test users associated with a particular app. This method manage paging, call facebook.fetchNext to get next page

Parameters:
appId - the ID of the app
limit - number of elements per page (can be null to use default page size)
Returns:
Test Users first page
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Test Users - Facebook Developers

deleteTestUser

boolean deleteTestUser(String testUserId)
                       throws FacebookException
Deletes the test user.

Parameters:
testUserId - the ID of the test user
Returns:
true if delete is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Test Users - Facebook Developers

makeFriendTestUser

boolean makeFriendTestUser(TestUser testUser1,
                           TestUser testUser2)
                           throws FacebookException
Makes friends connections for a test user with other test users.

Parameters:
testUser1 - test user
testUser2 - test user
Returns:
true on success, false otherwise
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Test Users - Facebook Developers


Copyright © 2019. All rights reserved.