Facebook带有页面的测试帐户 [英] Facebook test accounts with pages
问题描述
我正在创建一个涉及以下步骤的系统:
1. Facebook用户使用Facebook登录名登录(manage_pages范围)
2.正在收集用户的Facebook页面之一的access_token
3.然后扩展页面的访问令牌并将其存储在数据库中以供进一步使用
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
问题是,我需要对其进行测试,而对于Facebook的测试用户",他们只是无法创建页面.为此,我创建了常规帐户,并将其添加为角色"中的测试人员.但是据我所知,它违反了Facebook的规则,并且在他们试图禁止该帐户(并最终会禁止该帐户)时变得越来越烦人. 有任何想法吗? 谢谢!
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.对不起任何错误,而不是母语.
P.s. sorry for any mistakes, not a native speaker.
推荐答案
我遇到了同样的问题,终于能够为测试用户创建测试页.基本说明位于 https://developers.facebook.com/docs/apps/test中-pages ,但是我将添加如何使用Graph API Explorer实际创建测试页.
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.
-
创建测试用户.
Create a Test User.
单击更改此测试用户授予应用程序的权限,以确保已应用manage_pages
权限.
Click Change permissions this test user granted to app to ensure the manage_pages
permission has been applied.
获取测试用户的用户访问令牌.
Get a User access token for the Test User.
转到图形API资源管理器.粘贴您复制的用户访问令牌.将操作设置为POST并输入/[TEST_USER_ID_HERE]/accounts 之类的路径,然后输入与以下参数相对应的字段(可以随意更改值):
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]"
}
}
{
"name": "Test Page",
"category_enum": "MEDIA",
"about": "About test page",
"picture": "[URL TO A PICTURE]",
"cover_photo": {
"url": "[URL TO A COVER PHOTO]"
}
}
(请注意,如果您使用的是Graph Explorer的新测试版,则可以切换到JSON模式并直接粘贴到JSON中)
(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)
完成后,它将返回新的测试页的ID.您还可以通过GET操作调用/[TEST_USER_ID_HERE]/帐户,以再次查看该页面的ID.
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.
这篇关于Facebook带有页面的测试帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!