You can use the News Indexing API to manage your indexed news article URL.
You will need:
To get the status of a news article URL, send a GET
request to the id
parameter set to the URL and set the fields
parameters to scopes
. This will get the status of the URL in the available scopes.
curl -i -X GET "https://graph.facebook.com/?id=https://www.mynewsarticle.com &fields=scopes &access_token={system-user-access-token}"
{ "id"="https://www.mynewsarticle.com", "scopes": { "news_tab_dev_env": "INDEXED", "news_tab": "UNINDEXED", } }
In the above example, the article has been added to the news index but is not yet visible on Facebook.
You will need:
To update an indexed news article URL, send a POST
request to the id
parameter set to the updated URL and the scrape
parameter to true
. The scrape
parameter will allow the Facebook webcrawler to scrape the website for updated information.
curl -i -X POST "https://graph.facebook.com/?id=https%3A%2F%2Fwww.mynewsarticle.com &scopes=news_tab_dev_env &scrape=true &access_token={system-user-access-token}"
{ "url": "https://www.mynewsarticle.com", "scopes": { "news_tab_dev_env": "INDEXED" } }
Hide a published news article from Facebook News tab by adding it to the denylist.
You will need:
To add a URL to the deny list, send a POST
request to the id
parameter set to the URL you want to deny and the denylist
parameter to true
.
curl -i -X POST "https://graph.facebook.com/?id=https://www.mynewsarticle.com &denylist=true &scopes=news_tab_dev_env &access_token={system-user-access-token}"
{ "url": "https://www.mynewsarticle.com", "scopes": { "news_tab_dev_env": "DENYLISTED" } }
The denylist may be used in case an article is accidentally indexed via News API or if an article has to be unpublished on the publisher's end.
To remove a news article URL from the Facebook News Tab denylist, send a POST
request to the id
parameter set to the URL you want to remove and the denylist
parameter set to false
. This will remove the article from the Facebook News Tab denylist, setting it to be indexed, and allowing the article to be seen on the Facebook News Tab.
curl -i -X POST "https://graph.facebook.com/?id=https%3A%2F%2Fwww.mynewsarticle.com &denylist=false &scopes=news_tab_dev_env &access_token={non-expiring-system-user-access-token}”
{ "url": "https://www.mynewsarticle.com", "scopes": { "news_tab_dev_env": "INDEXED" } }