Facebook: Is it possible to DELETE a Checkin via Graph API?

余生长醉 提交于 2019-12-01 11:36:52

问题


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

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