[Answered ]-Django facebook app: Testing with Test Users?

2👍

Facebook provides an Open Graph API to create test users.

You can view the documentation here:
https://developers.facebook.com/docs/test_users/

How to create a test user (Your first question):

Get an app access token

https://graph.facebook.com/oauth/access_token?
client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&
grant_type=client_credentials

Or use the graph explorer https://developers.facebook.com/tools/explorer/

Or the access token tool: https://developers.facebook.com/tools/access_token/

Create the test user

https://graph.facebook.com/YOUR_APP_ID/accounts/test-users?installed=true&name=YOUR_DESIRED_TEST_USERNAME&permissions=DESIRED_PERMISSIONS_LIST&method=post&access_token=YOUR_APP_ACCESS_TOKEN

Or use the GUI manager for test users on the Open Graph section of your App management dashboard

https://developers.facebook.com/apps/YOUR_APP_ID/permissions

Choose “Add” under Test Users

0👍

1) Once you create the test users FB gives you a link you can use to log in, customize profiles and add photos, etc.

2) You can take a look at this CLI written in Python:
https://github.com/kcbanner/facebook-test-users

3) I am not sure, but I think you have a choice of whether to list or not list the facebook app in the directory. You can also limit access to certain users within your code by only allowing certain facebook ids access.

Leave a comment