Delete photo tag from Graph API

时光毁灭记忆、已成空白 提交于 2019-12-10 22:09:30

问题


I am trying to create an app that assists users in removing unwanted tags. I've heard a lot of complaining that FB no longer allows public access to the deletion of pictures... Is the same thing going on for tags?

I get {"error":{"type":"OAuthException","message":"(#3) Application does not have the capability to make this API call."}} when I try to do the deletion via

https://graph.facebook.com/some_photo_id/tags/user_id?access_token=a_valid_access_token&callback=whatever&method=delete&pretty=0&sdk=joey

I get the same error if I try an AJAX DELETE request or use FB.api('/pid/tags/uid', 'delete', function(){})

I have enabled the permissions: user_photos, friends_photos, publish_stream, publish_actions, user_status. Did I forget a certain permission?

I would really appreciate assistance with this issue.


回答1:


I've been able to upload a photo, and add some random tags to it on C#, but it seems to be impossible to remove them; it is weird because if you use the integrated app in a windows phone for example you can add and remove any tag you want without problems, the only restriction is that obviously you can't remove tags that you didn't create, only this wp integrated feature and the facebook's app in the android devices are capable of that but you'll find that in android devices with the facebook official app it is not posible to delete tags that you create of your friends, just yours.

If you want you can give it a try here where if you specify a valid photo id and a valid facebook user id you still get:

"error": {    
"message": "(#3) Application does not have the capability to make this API call.",
     "type": "OAuthException",
     "code": 3  
}

In fact I read in another forum that the applications where only able to delete tags and photos that they create and no more than that, but that was not the case, I uploaded and tagged a photo with my app but when I tried to delete the tags It was not posssible.




回答2:


UPDATE

Yes, now it's possible (but doesn't work). Documentation.

You can delete a tag for a particular user in the photo by issuing a HTTP DELETE request to /PHOTO_ID/tags/USER_ID or PHOTO_ID/tags?to=USER_ID.

OLD

It is not possible. It is possible only to create or update photo tags. Documentation.




回答3:


What about the delete request at the link you provided?

You can delete a tag for a particular user in the photo by issuing a HTTP DELETE request to /PHOTO_ID/tags/USER_ID or PHOTO_ID/tags?to=USER_ID.

Deleting a tag on a photo requires the publish_stream permission and supports the following parameters:

Parameter | Description                | Type   | Required
----------------------------------------------------------
to        | USER_ID of the User to tag | string | yes

The USER_ID can also be provided in URL path (see above)

If the deletion is successful, you get the following return:

Description               | Type
-----------------------------------
If the deletion succeeded | boolean


来源:https://stackoverflow.com/questions/7303028/delete-photo-tag-from-graph-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!