I have an id of created article and I also can get the status of the article by GET method:
{article_id}?access_token={access_token}
I get a response like:
{
"id": {article_id},
"status": "SUCCESS"
}
But when I try to delete the article by the DELETE method with the same params I'm getting this response:
{
"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"
}
}
Everything was done according to the documentation.
I'm using v2.6
graph version whit this permissions:
publish_pages, pages_manage_instant_articles, manage_pages
I use a page token that do not expire, I got it by @Simon.Ponder's answer.
I have the only one admin user for the application and the page.
How can it be solved?
I was able to delete post by using 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();
}
Hope it helps someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With