Cannot delete article using Instant Article API DELETE

I have an identifier for the created article, and I can also get the status of the article using the GET method:

{article_id}?access_token={access_token} 

I get an answer like:

 { "id": {article_id}, "status": "SUCCESS" } 

But when I try to delete the article using the DELETE method with the same parameters, I get this answer:

 { "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 in accordance with the documentation .

I am using v2.6 version of the graph with these permissions:

 publish_pages, pages_manage_instant_articles, manage_pages 

I use a page token that does not expire, I got it @ Simon.Ponder Reply .

I have only one admin user for the application and page.

How can this be solved?

+6
source share
2 answers

I managed to delete the message 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 this helps someone.

+1
source

In your question, you say that after publishing your article you get an answer like this

 { "id": {article_id}, "status": "SUCCESS" } 

But this is not article_id , this is import_status_id . So

 { "id": {import_status_id}, "status": "SUCCESS" } 

With import_status_id you can get article_id using this api if your articles are published successfully. then you can delete your article using delete api , as usual. Thanks.

+1
source

All Articles