-->

Facebook test accounts with pages

2019-04-08 12:20发布

问题:

I'm creating a system which involves these steps:
1. Facebook user logs in with Facebook login (manage_pages scope)
2. One of user's Facebook page's access_token is being collected
3. Page's access token is then extended and stored in database for further use

The problem is, that I need to test it and when it comes to Facebook's "test-users", they just can't create a page. I created regular account for this purpose and added it as a Tester in Roles. But as I know it violates rules of Facebook and it's getting annoying as they trying to ban that account (and eventually will). Any ideas? Thanks!

P.s. sorry for any mistakes, not a native speaker.

回答1:

I ran into this same issue and was finally able to create a Test Page for a Test User. The basic instructions are found at https://developers.facebook.com/docs/apps/test-pages, but I will add how to actually create the Test Page using the Graph API Explorer.

  1. Create a Test User.

  2. Click Change permissions this test user granted to app to ensure the manage_pages permission has been applied.

  3. Get a User access token for the Test User.

  4. Go to the Graph API Explorer. Paste in the user Access Token you copied. Set the action to POST and enter the path like /[TEST_USER_ID_HERE]/accounts then enter fields corresponding to the following parameters (feel free to change the values):

    { "name": "Test Page", "category_enum": "MEDIA", "about": "About test page", "picture": "[URL TO A PICTURE]", "cover_photo": { "url": "[URL TO A COVER PHOTO]" } }

(note if you use the new beta version of the Graph Explorer, you can switch to JSON mode and just paste in the JSON directly)

Once that completes, it will return the new Test Page's ID. You can also call /[TEST_USER_ID_HERE]/accounts with the GET action to see that Page's ID again.



回答2:

I was in similar situation, not able to create pages using test user. I think they fixed the issue recently. I am now able to create a page for a test user.