我有一个已创建文章的 ID,我还可以通过 GET 方法获取文章的状态:
{article_id}?access_token={access_token}
我收到如下回复:
{
"id": {article_id},
"status": "SUCCESS"
}
但是当我尝试使用具有相同参数的 DELETE 方法删除文章时,我得到了这样的响应:
{
"error": {
"message": "(#240) Requires a valid user to be specified (either via the session or via the API parameter for specifying the user.",
"type": "OAuthException",
"code": 240,
"fbtrace_id": "GsXXXXBjq"
}
}
一切都是按照 documentation 完成的.
我正在使用具有此权限的 v2.6
图形版本:
publish_pages, pages_manage_instant_articles, manage_pages
我使用了一个不会过期的页面 token ,我通过 @Simon.Ponder's answer 获得了它.
应用程序和页面只有一个管理员用户。
如何解决?
最佳答案
我可以使用 facebook-instant-articles-sdk-php 删除帖子
$client = Client::create(
$this->options->app_id,
$this->options->app_secret,
$this->options->access_token,
$this->options->page_id,
true);
try {
$client->removeArticle($my_canonical_url)
} catch (Exception $e) {
throw $e->getMessage();
}
希望对大家有帮助。
关于facebook - 无法通过 Facebook Instant Article API 的 DELETE 方法删除文章,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37936724/