RSS Feeds for Instant Articles
Instant Articles support syndication using a secure RSS feed. This feed can integrate seamlessly with your existing workflow if new stories are automatically syndicated as Instant Articles whenever you publish them from your regular content management system. Note that this will need to be an Instant Articles-specific RSS feed and is not the same as other RSS feeds you may already have.
You should only publish new stories via your Instant Articles RSS feed when they are also publicly available on your website. The Instant Articles system requires access to each article's standard web URL to render the content properly.
Import Articles with an RSS Feed
Here's how to set up automated publishing using an RSS feed:
1. Create an RSS Feed
To enable automated publishing of your Instant Articles, configure your content management system to generate an RSS feed which contains the full content of each article in Instant Articles markup. This feed should be new and separate from other RSS feeds you may already operate.
Each article in this RSS feed must be represented as an
<item> and should include a set of elements that contain the article content and all relevant metadata. While not all elements are required, it's best to include the entire set of elements to provide as much context about your Instant Articles as possible.
Articles from your RSS feed will be ingested by Facebook multiple times every hour. As a best practice, we recommend that your RSS feed includes only articles that have been created or updated in the last hour to ensure a sufficient overlap between pulls of your RSS feed. Once new or updated articles have been ingested successfully, you can remove them from your RSS feed.
The headline of the article.
The canonical URL for this article on your site.
The full content of your article, in HTML form. Remember to escape all HTML content by wrapping it within a CDATA section.
A string that provides a unique identifier for this article in your feed.
A summary of your article, in plain text form.
The date of the article’s publication, in ISO-8601 format.
Name of the person who wrote the article. Use multiple
2. Connect the RSS Feed to Your Facebook Page
Specify the RSS feed that will distribute your content to Facebook through the Publishing Tools for your Facebook Page. From the top of your Page, click Publishing Tools, then select Configuration under the Instant Articles header from the menu on the left of the screen. Under the Tools section, choose Production RSS Feed.
Though optional, we recommend configuring basic authentication (username and password) for your RSS feed and serving it with SSL/TLS (i.e. HTTPS) if you want your feed to be private.
You can specify a username and password for your feed on the Configuration page. Facebook will encrypt and store these internally for use when publishing your content.
Once your RSS feed has been approved and you activate your feed, all new articles received from your RSS feed will automatically appear in Instant Article form when you share them on your Page.
If you want to disable automatic conversion, check the box for “Import all articles as drafts” under Production RSS Feed in the Tools section of Configuration. Learn more about managing your Instant Articles library.
You can also configure a development RSS feed for testing purposes. Articles from the development feed are isolated from your production feed and will never be publicly visible. Read more about the development feed below in the Development RSS Feed section.
3. Verify Your Feed Is Being Ingested Properly
Once you’ve connected your RSS feed to your Facebook Page, Facebook will pull stories from your RSS feed into the Instant Articles system. If errors are found in your RSS feed, they will be displayed on the RSS configuration screen in the Publishing Tools for your Facebook Page. RSS feed errors must be resolved before you can proceed. See Test and Debug Articles for instructions on how to troubleshoot and eliminate errors.
If no RSS feed errors are reported, ensure that your articles are populating the Instant Articles library associated with your Facebook Page. From the top of your Page, click Publishing Tools then select Production Articles under Instant Articles in the menu on the left of the screen. The Instant Articles library looks like this:
4. Update Published Articles
At times you may need to update the content of a previously published article, as in the case of a developing news story. To automatically specify an article to update and republish, its HTML must include the op-published and op-modified
<time> elements, and the updated article must be redistributed via your RSS feed.
Facebook checks your RSS feed multiple times each hour to determine if any of your Instant Articles content has been updated. An Instant Article will be updated and republished if the op-modified date for an article in your RSS feed is more recent than the op-modified date of the existing article in your library.
There are a few limitations to consider when updating articles that have been previously published:
Facebook pulls a maximum of 100 items that are new or modified since the last pull. If you are adding or changing more than 100 items every ten minutes or so, the Instant Articles system will only update the first 100 items, sorted by modified time, with the most recent appearing first.
If an update to an existing Instant Article is more than 24 hours old based on its
op-modifiedtime, it will be ignored by the pull. For example, if your feed is pulled at 12:00pm on October 8th and an article in your feed with the op-modified time set to 11:59am on October 7th, it will be ignored.
If you attempt to update an existing article through your RSS feed and the update is ignored, Facebook will continue to display the most recent version of the article in the Instant Articles system. Changes to published Instant Articles that are more than one day old can be implemented manually, via the web-based Instant Articles editor tool accessible from your Facebook Page.
Media assets associated with an RSS item will only update if the URL of the media asset has changed.
5. Ensure Facebook Crawler Can Reach Your Content
To properly distribute your content to Instant Articles, ensure your content is visible to our crawler. If you normally restrict access to your content, you'll need to whitelist our crawler. Please refer to our Facebook Crawler guide for advice on how to identify our crawler and preferred approaches to whitelisting.
6. Submit Your Feed for Review
You will be able to activate your Instant Articles feed after it has successfully passed the Article Review. Until then, you won't be able to publish Instant Articles.
Development RSS Feed
Publishers with an approved production RSS feed can set up a separate development RSS feed to develop and test changes. The development feed is isolated from your production feed, and articles from this feed will never be publicly visible.
To set up a development feed, click Publishing Tools from the top of your Facebook Page, select Configuration under the Instant Articles heading from the left menu and find the Development RSS Feed section:
Input the URL of your development RSS feed and provide HTTP authentication credentials if needed. Click Save and Facebook will begin to pull content from the feed every 3 minutes. After the first pull, you will see an updated status for the feed as well as any warnings or error messages from the processing.
If your development feed is error-free and articles have been ingested, you will see these articles in a separate “sandbox” section of your Instant Articles library. To find the articles, click Publishing Tools from the top of your Page and select Development Articles under the Instant Articles heading in the left menu. The library of your articles from the development feed will look like this:
From here, you can create, edit and delete articles in the development sandbox.
To test articles in the development sandbox on your mobile device, use the Pages Manager app as described in the Pages Manager section above. The articles will be under the Development tab, which looks like this:
Sample RSS Feed
This is an example of an RSS 2.0 feed optimized for Instant Articles:
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"> <channel> <title>News Publisher</title> <link>http://www.example.com/</link> <description> Read our awesome news, every day. </description> <language>en-us</language> <lastBuildDate>2014-12-11T04:44:16Z</lastBuildDate> <item> <title>This is an Instant Article</title> <link>http://example.com/article.html</link> <guid>2fd4e1c67a2d28fced849ee1bb76e7391b93eb12</guid> <pubDate>2014-12-11T04:44:16Z</pubDate> <author>Mr. Author</author> <description>This is my first Instant Article. How awesome is this?</description> <content:encoded> <![CDATA[ <!doctype html> <html lang="en" prefix="op: http://media.facebook.com/op#"> <head> <meta charset="utf-8"> <link rel="canonical" href="http://example.com/article.html"> <meta property="op:markup_version" content="v1.0"> </head> <body> <article> <header> <!— Article header goes here --> </header> <!— Article body goes here --> <footer> <!— Article footer goes here --> </footer> </article> </body> </html> ]]> </content:encoded> </item> <!— Another Article (Each Article must be represented as an <item>) --> <item> <title>This is another Instant Article</title> <link>http://example.com/another_article.html</link> <pubDate>2017-02-14T05:20:00Z</pubDate> <content:encoded> <![CDATA[ <!doctype html> <html lang="en" prefix="op: http://media.facebook.com/op#"> <head> <meta charset="utf-8"> <link rel="canonical" href="http://example.com/another_article.html"> <meta property="op:markup_version" content="v1.0"> </head> <body> <article> <header> <!— Article header goes here --> </header> <!— Article body goes here --> <footer> <!— Article footer goes here --> </footer> </article> </body> </html> ]]> </content:encoded> </item> </channel> </rss>