[英]how can i delete a Facebook Test User with 2+ apps using the Graph API
When i try to delete the user like it says in the docs ( http://developers.facebook.com/docs/test_users/#deleting ) i get the error response : 当我尝试按docs( http://developers.facebook.com/docs/test_users/#deleting )中的说明删除用户时,出现错误响应:
(#2903) Cannot delete this test account because it is associated with other applications. Use DELETE app_id/accounts/test-users/test_account_id to remove it from other apps first. Use GET test_user_id/ownerapps to get complete list of owner apps.
then when i try to do what it says (replacing <user_id>
and <app_id>
with a facebook numeric id) : 然后,当我尝试执行其
<app_id>
(将<user_id>
和<app_id>
替换为Facebook数字ID)时:
DELETE <app_id>/accounts/test-users/<user_id> to remove it from other apps first
i get this error : 我收到此错误:
Unknown path components: /<user_id>
am i missing something ? 我想念什么吗?
As the error said you cannot delete an user because it has been assigned to two or more application. 如错误所述,您无法删除用户,因为该用户已分配给两个或多个应用程序。
The workaround for this is to get all the applications which are using this specific user using this call 解决方法是使用此调用获取使用该特定用户的所有应用程序
"https://graph.facebook.com/TEST_ACCOUNT_ID/ownerapps&access_token=YOUR_APP_ACCESS_TOKEN" “ https://graph.facebook.com/TEST_ACCOUNT_ID/ownerapps&access_token=YOUR_APP_ACCESS_TOKEN”
This will give you the list of app the test account is attached to prior decoding the object with a JSON serializer. 这将为您提供测试帐户所附加的应用程序列表,以便使用JSON序列化程序对对象进行事先解码。 Then you can remove and not delete the test account from each app until only one remains using :
然后,您可以从每个应用中删除而不是删除测试帐户,直到只有一个使用以下帐户:
"https://graph.facebook.com/APP_ID/accounts/test-users?uid=TEST_ACCOUNT_ID&access_token=APPLICATION_ACCESS_TOKEN&method=delete" “ https://graph.facebook.com/APP_ID/accounts/test-users?uid=TEST_ACCOUNT_ID&access_token=APPLICATION_ACCESS_TOKEN&method=delete”
When only one app remains you can delete the test account using : 当仅剩一个应用程序时,您可以使用删除测试帐户:
"https://graph.facebook.com/TEST_ACCOUNT_ID?method=delete&access_token=TEST_ACCOUNT_ACCESS_TOKEN" “ https://graph.facebook.com/TEST_ACCOUNT_ID?method=delete&access_token=TEST_ACCOUNT_ACCESS_TOKEN”
Hope this help! 希望有帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.