如何使用 Facebook 上的 ID 和权限(访问令牌)删除帖子?
我创建了一个 Facebook 应用程序,该应用程序有权在墙上发帖,具有离线访问权限,并且可以在数据库中存储访问令牌。
该应用程序只需要您访问画布页面一次,然后它将开始每 5 小时为您提供一个“帖子”。
因此,作为升级,我需要删除之前的帖子(我有它的 ID)并发布新帖子,这样我们就不会收到垃圾邮件报告。
那么我如何使用访问令牌和帖子 ID 删除帖子,就像 Shady Wallas post_id{"id":"1658870381_2143043309837"}
以下是一些示例数据:
https://graph.facebook.com/ Graph url Shady.wallas Profile and User ID 1658870381_2143043309837 Post ID "planbxe3qxdfghk......." Access token
I have created a Facebook application that has the permission to post on wall, has offline access, and can store access tokens in the database.
The application only needs you to go to canvas page once, and then it will start serving you a "post" every 5 hours.
So as an upgrade, I need to delete the previous post (I have it's id) and post a new one so we don't get spam reports.
So how can i delete the Post using an access token and Post ID, like that on Shady Wallas post_id{"id":"1658870381_2143043309837"}
Here is some example data:
https://graph.facebook.com/ Graph url Shady.wallas Profile and User ID 1658870381_2143043309837 Post ID "planbxe3qxdfghk......." Access token
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Facebook 图形 API 文档 告诉您:
The Facebook graph API documentation tells you:
正如 OffBySome 所说,这在 Graph API 文档中明确涵盖,帖子的示例位于 https://developers.facebook.com/docs/reference/api/post/#delete
请注意,未经用户明确同意向用户墙发布内容违反 Facebook 政策,并且可能会导致垃圾邮件报告并启动反垃圾邮件系统,无论您随后是否要删除这些帖子并用其他较新的帖子替换它们。如果有的话,当用户发现归因于您的应用程序的内容出现和消失时,可能会导致更多报告。
As OffBySome stated, this is expressly covered in the Graph API Documentation, the example given for posts is at https://developers.facebook.com/docs/reference/api/post/#delete
Note that publishing to a user's wall without their explicit consent is against Facebook policy, and will likely result in spam reports and trip anti spam systems regardless of whether you're subsequently removing the posts and replacing them with other, newer posts. If anything, it might result in more reports as users find content appearing and disappearing which is attributed to your application.