Facebook Instant Articles PHP SDK

The Facebook Instant Articles SDK for PHP provides a native interface for creating and publishing Instant Articles. The SDK enables developers to more easily integrate Instant Articles into content management systems and in turn enables journalist and publishers to easily publish Instant Articles.

Get the Code on GitHub

Getting Started

To get started integrating with your own CMS, see the CMS Integration section and also familiarize yourself with the three primary components of the SDK:

  • Elements - Instant Article Markup renderer
  • Transformer - Engine which transforms HTML into Elements objects
  • Client - Client to publish Instant Articles
  • Parser - Component that parses an Instant Article markup file/string/DOMDocument into Elements objects

Transformer Rules - Within the Transformer are rules which define a mapping between elements in the source markup and valid Instant Article components. These rules are customizable to allow flexibility in the interpretation of the source markup and is a crucial part of the transformation process.