[英]How can I get the list of facebook apps for a certain user using Graph API Explorer or another tool
[英]how can i delete a Facebook Test User with 2+ apps using the Graph API
當我嘗試按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.
然后,當我嘗試執行其<app_id>
(將<user_id>
和<app_id>
替換為Facebook數字ID)時:
DELETE <app_id>/accounts/test-users/<user_id> to remove it from other apps first
我收到此錯誤:
Unknown path components: /<user_id>
我想念什么嗎?
如錯誤所述,您無法刪除用戶,因為該用戶已分配給兩個或多個應用程序。
解決方法是使用此調用獲取使用該特定用戶的所有應用程序
“ https://graph.facebook.com/TEST_ACCOUNT_ID/ownerapps&access_token=YOUR_APP_ACCESS_TOKEN”
這將為您提供測試帳戶所附加的應用程序列表,以便使用JSON序列化程序對對象進行事先解碼。 然后,您可以從每個應用中刪除而不是刪除測試帳戶,直到只有一個使用以下帳戶:
“ https://graph.facebook.com/APP_ID/accounts/test-users?uid=TEST_ACCOUNT_ID&access_token=APPLICATION_ACCESS_TOKEN&method=delete”
當僅剩一個應用程序時,您可以使用刪除測試帳戶:
“ https://graph.facebook.com/TEST_ACCOUNT_ID?method=delete&access_token=TEST_ACCOUNT_ACCESS_TOKEN”
希望有幫助!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.