简体   繁体   English

我如何使用Graph API删除具有2个以上应用程序的Facebook测试用户

[英]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.

相关问题 如何使用Graph API Explorer或其他工具获取特定用户的Facebook应用列表 - How can I get the list of facebook apps for a certain user using Graph API Explorer or another tool 如何使用Facebook Graph API标记照片中的用户? - How can I tag a user in a photo using the Facebook Graph API? 在Facebook审核之前,如何测试Facebook开放图api(user_posts)? - How can I test the Facebook open graph api (user_posts) before Facebook review? 如何使用Graph API删除Facebook上的视频? - How to delete a video on Facebook using Graph API? 如何通过调用 Graph API 获取 facebook 用户元数据? - How can I get a facebook user metadata by calling the Graph API? 如何使用Facebook graph API判断用户是否在线? - Using the Facebook graph API how do I tell if a user is online or not? 如何使用Graph API获取Facebook用户的“亲密朋友”列表? - How can I get “close friends” list of a Facebook user, using the Graph API? 如何在不要求用户登录的情况下使用Facebook Graph API阅读帖子? - How can I read posts using the Facebook Graph API without asking the user to log in? 如何使用图谱API检索特定用户的Facebook评论? - How can I retrieve facebook comment of specific user by using graph api? 如何使用Graph API获取在我的Facebook页面中签入的用户ID? - How can I get the user IDs who checked in my Facebook page by using Graph API?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM