我看到每个应用程序有 500 个测试用户的限制,所以我想我会编写一些代码来定期删除它们。(我为每个自动化测试创建一个新的测试用户)
我发现即使在我删除它之后,facebook 仍然报告测试用户的存在。示例请求/响应如下。我删除它们错了吗?或者,是否不能真正删除测试用户并避免达到 500 个用户上限?
这是我查询现有用户、删除一个并再次查询的跟踪。结果中仍然是同一用户:
Request: GET https://graph.facebook.com/220266841382535/accounts/test-users?access_token=<removed>
Response:
{
"data": [
{
"id": "100003291443080",
"access_token": "<removed>",
"login_url": "https:\/\/www.facebook.com\/platform\/test_account_login.php?user_id=<removed>"
},
...
],
"paging": {
"next": "https:\/\/graph.facebook.com\/220266841382535\/accounts\/test-users?access_token=<removed>&limit=50&offset=50&__after_id=100003245483203"
}
}
Request: DELETE https://graph.facebook.com/100003291443080?access_token=<removed>
Response:
true
Request: GET https://graph.facebook.com/220266841382535/accounts/test-users?access_token=<removed>
Response:
{
"data": [
{
"id": "100003291443080",
"access_token": "<removed>",
"login_url": "https:\/\/www.facebook.com\/platform\/test_account_login.php?user_id=<removed>"
},
....
],
"paging": {
"next": "https:\/\/graph.facebook.com\/220266841382535\/accounts\/test-users?access_token=<removed>&limit=50&offset=50&__after_id=100003245483203"
}
}