问题
When I post a checkin to Facebook the API returns the id of the story created.
How can I delete this story?
I tried to delete using
DELETE -> /me/ID
or
DELETE -> /ID
without success.
I received the response GraphMethodException: Unsupported delete request.
回答1:
You're right, it doesn't work for me either:
{
"error": {
"message": "Unsupported delete request.",
"type": "GraphMethodException",
"code": 100
}
}
But, as Lix quoted:
NOTE: Publishing a Checkin object is deprecated in favor of creating a Post with a location attached.
From https://developers.facebook.com/docs/reference/api/checkin/
It means that Checkin
should not be used anymore. Instead, you have to create a Post
.
You can create a post on behalf of the user by issuing an HTTP POST request to PROFILE_ID/feed (not PROFILE_ID/posts)
Creating a post with a location:
Result:
{
"id": "1022369832_4517701013579"
}
Deleting the post with a location:
DELETE -> http://graph.facebook.com/1022369832_4517701013579
Result: true
I think that you haven't any other choice.
来源:https://stackoverflow.com/questions/13821460/facebook-is-it-possible-to-delete-a-checkin-via-graph-api