Publishing To Facebook Instant - Atavist/developer GitHub Wiki

Atavist now offers support for Facebook Instant Articles. At present, the feature is available by invitation only. If you are interested in using this feature, please contact [email protected] and your request will be considered. What follows are instructions for using the feature.

Setting Up The Feeds

Atavist supports two separate RSS feeds for Facebook Instant, one for production and one for development. To get started, retrieve the URLs for these feeds from the Advanced Settings page (http://atavist.com/cms/settings/advanced_settings). Paste these URLs into the Facebook Instant administration tool in RSS Feed->RSS Feed URL and Development Feed->RSS Feed URL.

Important: Note that if you make changes to your Atavist URL, the feed URLs will also change, which may require an update to your settings in the Facebook administration tool.

Publishing

Individual projects can be set to publish to either of the two feeds, or neither. These settings are found on the Syndication Settings page for each project. From within a project, click the blue Publish button, then click Syndicate. Here, you can switch on either feed. You have the option to specify a Facebook Instant style by name. If none is specified, the default style will be used. For more on Facebook Instant styles, see https://developers.facebook.com/docs/instant-articles/guides/design.

When a project is published to the web on the main publish page, it will simultaneously be published to Facebook Instant, assuming either of the checkboxes were set.

New Project Defaults

On the Advanced Settings page, you can specify default settings for feed opt-in and style. These defaults will be applied to any new projects that are created. Changing these will have no effect on existing projects.

Blocks

The Atavist implementation converts blocks to Facebook Instant conventions wherever appropriate. Those that do not correspond to Facebook Instant conventions are treated as third-party interactives, and will be displayed exactly as they would appear in Atavist web output. The blocks that are natively supported are as follows:

  • Video
  • Map
  • Slideshow
  • Pullquote
  • Instagram
  • Twitter
  • Image
  • Parallax Image

Custom Blocks

If custom blocks are part of your implementation, you may need to provide templating guidance for how these should be handled. If you do not, Facebook Instant will display them exactly as they appear in Atavist web output. In some situations, this may be desirable, but in others you may want to take advantage of Facebook Instant native elements, and this is where you would need to provide custom templates.

On the Advanced Settings page, find the Custom Block Templates area. Click + Add to set one up. From the BLOCK dropdown, select the custom block you wish to templatize. Then, in the TEMPLATE area, insert the template using mustache keys to represent your block’s data. These templates should conform to Facebook Instant documentation, found here: https://developers.facebook.com/docs/instant-articles/reference.

For text properties, use the property name as-is, e.g. {{my_text_field}}. In cases where a property is an asset, use the path subparameter to render its path, e.g. {{#my_image}}{{path}}{{/my_image}}.

For example, an image block with an asset and a caption could be handled as follows:

<figure>
  <img src="{{#the_image}}{{path}}{{/the_image}}" />
  {{#caption}}
  <figcaption>{{{caption}}}</figcaption>
  {{/caption}}
</figure>

If you wish to completely exclude a custom block from Facebook Instant, check Exclude From Facebook Instant instead of populating the template field.

Important: Note that any changes to Custom Block handling will require republishing all stories that use them.

⚠️ **GitHub.com Fallback** ⚠️