Facebook:是否可以通过Graph API删除签入? [英] Facebook: Is it possible to DELETE a Checkin via Graph API?

查看:186
本文介绍了Facebook:是否可以通过Graph API删除签入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如果我向Facebook发送签到,API将返回创建的故事ID。



我尝试使用

删除

  DELETE  - > / me / ID 

  DELETE  - > / ID 

没有成功。
我收到响应 GraphMethodException:不支持的删除请求。

解决方案

p>你说得对,对我来说也不行:

  {
error:{
message:不支持的删除请求,
type:GraphMethodException,
code:100
}
}

但是,正如Lix引用的:


注意:发布Checkin对象是已弃用,有利于创建一个 https://developers.facebook.com/docs/reference/api/checkin/



这意味着不应该使用 Checkin 相反,您必须创建一个 Post


您可以创建一个代表用户通过向PROFILE_ID / feed发出HTTP POST
请求(不是PROFILE_ID / posts)


创建一个位置的帖子





结果:

  {
id:1022369832_4517701013579
}

删除具有位置的帖子

  DELETE  - > http://graph.facebook.com/1022369832_4517701013579 

结果: true



我认为你没有其他选择。


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.

解决方案

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.

这篇关于Facebook:是否可以通过Graph API删除签入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆