Facebook : graph api object delete options?
-
16-06-2021 - |
Вопрос
Facebook graph api allows you to do things using either the object id (which it generates) or object_url (which you generate). Can I delete facebook graph api object using object url?
For instance:
POST https://graph.facebook.com/id={object_id or object_url}&scrape=true
(tells facebook to re-scrape the object from your site)
What I want to know is, can I tell facebook to delete the object using the object url?
Or do I have to keep track of the id's and use:
DELETE https://graph.facebook.com/{id}
Решение
You can only delete your own Post on the Users wall, that means you not able to delete post from other Apps. And you need a access token
Deleting http://developers.facebook.com/docs/reference/api/
You can delete objects in the graph by issuing HTTP DELETE requests to the object URLs, i.e,
DELETE https://graph.facebook.com/ID?access_token=... HTTP/1.1
To support clients that do not support all HTTP methods (like JavaScript clients), you can alternatively issue a POST request to an object URL with the additional argument
method=delete
to override the HTTP method. For example, you can delete a comment by issuing a POST request to https://graph.facebook.com/COMMENT_ID?method=delete.You can delete a like by issuing a DELETE request to
/OBJECT_ID/likes
(since likes don't have an ID).