Facebook test accounts with pages

二次信任 提交于 2019-12-21 05:07:22

问题


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.



来源:https://stackoverflow.com/questions/50586873/facebook-test-accounts-with-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!