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

后端 未结 1 803
鱼传尺愫
鱼传尺愫 2021-01-15 20:12

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 -&         


        
相关标签:
1条回答
  • 2021-01-15 20:49

    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:

    Let's check in at New York!

    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.

    0 讨论(0)
提交回复
热议问题