Test Users for Apps

A test user is a special Facebook account, invisible to real accounts, which can be created within an app for the purpose of manual or automated testing of that app's Facebook integration.

We ensure that test users are exempt from our spam and fake account detection systems so that you can test your app without worrying about getting disabled.

You can create, access and delete test user accounts in a couple of ways - by using the Graph API to do it programmatically, or by using the App Dashboard to do it manually.

Managing via the Graph API

The /app/accounts/test-users/ Graph API edge can be used to:

  • Create new test user accounts for an app.
  • Read the list of existing test accounts associated with an app.
  • Get a valid access token for each test user.
  • Associate, and disassociate, existing test accounts with apps.
  • Log in as the test user using the login_url field.

The /test-user Graph API node can be used to:

  • See details about an individual test account.
  • Update a test accounts name or password.
  • Delete test accounts.
  • Create friend connections between test users.

Read the linked Graph API reference docs to see how those APIs should be used.

Managing via the App Dashboard

The App Dashboard provides an interface to perform many of the tasks you'll want to be able to do with test users:

  • Create new test user accounts for an app.
  • See the list of existing test accounts associated with an app.
  • Get a valid access token for each test user.
  • Log in as the test user.
  • Update a test accounts name or password.
  • Delete test accounts.
  • Create friend connections between test users.

However, if you want to associate, and disassociate, existing test accounts with other apps you will need to use the Graph API as shown above.

The interface for management is relatively simple, but we'll show you how to use it below.

Accessing the Test User management tool

Open the App Dashboard and choose the app that you want to manage test accounts for. Select Roles then Test Users from the left hand side menu.

The Test Users panel displays a list of test users with names, user IDs, and email addresses associated with this app. You can use these users to login into the test account. The Open Graph Test User is automatically created for any app and is used by our app review team during the Open Graph submission process.

  • Click the Add button to add new test users. You can add up to 4 at one time.
  • Click the Edit button to add or remove permissions, change the age range, etc., of a test user.
  • Select the checkbox next to a user to delete it.

Creating Test Users

Click on the Add button to create a new test user. You'll then be prompted with a dialog that has a few options:

  • Number to Create determines how many individual test user accounts are created. If you want to create more in bulk, you should use the Graph API instead.
  • Authorize Test Users for This App determines whether each newly created test account will have the app installed, the API version, and the Login Permissions granted.
  • Under 18 determines whether the accounts will have an age under 18 years old, which is useful for testing demographic restrictions. You can still change this age later manually by logging into the test account.
  • Language chooses the locale that the test accounts will use to view Facebook.

Once you've chosen your options, click the Create Test Users button and after a few seconds the new account will be created and appear in the test user list.

Deleting Test Users

You can use the checkboxes in the left column of the Test User screen to pick a number of test accounts, and then click the Delete button to delete those accounts. This process cannot be undone, so be sure you want to actually delete the account.

Rules for Usage

  • Each app can create a maximum of 2000 test users.
  • Test users can't Like or Follow public Facebook Pages or post on their Timeline.
  • Test users can only comment on posts published by the app via a Facebook share dialog or Graph API.
  • Test accounts can only be configured by a developer of an app in that app's settings page.
  • You can log in as a test user through an app's settings page.
  • A test user's data is only visible to other test users, and real users can not see test user data.
  • Test users will only have 'Tester' privileges on the associated app. This means that they can use the app in Public Mode or Development Mode, but cannot edit any technical settings or access insights for that app.
  • Test accounts cannot be converted to normal user accounts.