Follow the docs for creating test user: https://developers.facebook.com/docs/test_users/
__
Creating
You can create a test user associated with a particular app using the Graph API with your app access token.
API
https://graph.facebook.com/APP_ID/accounts/test-users?
installed=true
&name=FULL_NAME
&permissions=read_stream
&method=post
&access_token=APP_ACCESS_TOKEN
Parameters:
You can specify whether this user has already installed your app as well as the set of permissions that your app is granted for this user by default upon creation.
installed: This is a Boolean parameter to specify whether your app should be installed for the test user at the time of creation. It is true by default.
name: this is an optional string parameter. You can specify a name for the test user you create. The specified name will also be used in the email address assigned to the test user.
permissions: This is a comma-separated list of extended permissions. Your app is granted these permissions for the new test user if installed is true.
access_token: {app_id}|{app_secret}
Response :
{ "id": "1234...", "access_token":"1234567..." ,
"login_url":"https://www.facebook.com/platform/test_account..."
"email": "example...@tfbnw.net", "password": "1234..." }
id : User id of the test user
access_token: You can use this access token to make API calls on behalf of the test user. This is available only if your app has been installed by the test user.
login_url: You can login as the test user by going to this url. This expires on first use or after one hour whichever happens first to ensure that the test accounts remain secure. You can easily refresh the login_url by simply calling the get method again.
email: If logging in manually (that is, not using the login_url), you can use this as the user's email address.
password: If logging in manually (that is, not using the login_url), you can use this as the user's password. You should store this password, as it will only be returned on the creation of the test user. This is because we don't store the password ourselves, just the hash. See this section should you need to change/reset the password.
Error Codes:
If you exceed the limit of test users you can create for an app you will receive an error.
Error code: 2900 (Too many test accounts)