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

First open up the App Dashboard and then choose the app that you want to manage the test accounts for. Then choose the Roles option from the left hand side menu:

On the roles page, click the Test Users tab at the top, and you'll see the Test User tool:

Here you can see each of the test users already associated with this app. You can also see their User ID and email address (which can be used together with their password to log 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.

The final column on this screen has links to various functions that are available to you for each test account:

  • Click on the icon to edit the name of the test user, or the password that can be used to manually log in to that account.
  • Click on the icon to generate an access token for that test user. This access token can then be used to make Graph API calls until it expires.
  • Click on the icon to add another test user as a friend of this one.
  • Click on the icon to automatically log in to this test account.

Creating Test Users

From this screen you can 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 already have logged into the app (using Facebook Login), without having to accept the Login Dialog, etc.
  • Enable Ticker allows anyone logged into each of these test accounts to view the ticker for that user.
  • 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.