Test Users

Test Users are special Users you can use to test your app. They are hidden from real User accounts, and any data you generate with a Test User will only be visible to other Test Users on that app, or to real Users who have a Admin, Developer, or Tester role on the app. Test Users are also exempt from our spam and fake account detection systems, so they won't be disabled when you use them to test your app.

You can create, edit, delete, and log in as a Test User through your app's App Dashboard or the Graph API.

Limitations

  • Apps are limited to 2000 Test Users.
  • Test Users can only be created by app Admins or Developers.
  • Test Users can only interact with other Test Users, or real Users who have a Admin, Developer, or Tester role on the app.
  • Data generated by a Test User can only be seen by other Test Users or real Users who have a Admin, Developer, or Tester role on the app.
  • Test Users can only interact with app-scoped Test Pages.
  • Test Users can only comment on app Posts published via a Facebook Share Dialog or the Graph API.
  • Test Users cannot be converted to real Users.

App Dashboard

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

  • Create new test user accounts for an app.
  • Delete test user accounts for an app.
  • Read the list of existing test accounts associated with an app.
  • Change the name or password for a test user.
  • Change permissions a test user granted to an app.
  • Get a valid access token for each test user.
  • Manage this test user's friends.
  • Change login token expiration time.
  • Log in as the test user.
  • Override the API version in Graph API requests for this test user.

Note: If you want to associate or disassociate existing test accounts with other apps you will need to use the /app/accounts/test-users Graph API edge.

Accessing the Test User Management Tool

Open the App Dashboard and choose the app for which you want to manage test accounts. 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.

Graph API

The /app/accounts/test-users Graph API edge can be used by app Admins or Developers 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.