GithubHelp home page GithubHelp logo

twahir-khamis / facebook-instant-articles-sdk-php Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebookarchive/facebook-instant-articles-sdk-php

0.0 1.0 0.0 437 KB

The Facebook Instant Articles SDK for PHP provides a native interface for creating and publishing Instant Articles.

Home Page: https://instantarticles.fb.com/

License: Other

PHP 97.83% HTML 2.17%

facebook-instant-articles-sdk-php's Introduction

Facebook Instant Articles PHP SDK

Build Status Latest Stable Version

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.

The SDK consists of three components:

  • Elements: A domain-specific language for creating an Instant Articles structure that strictly follows the specification and can be automatically serialized into the subset of HTML5 markup used in the Instant Articles format. This language allows users to programmatically create Instant Articles that are guaranteed to be in compliance with the format.
  • Transformer: An engine for transforming any markup into an Instant Article structure in the DSL. The engine runs a set of rules on the markup that will specify the selection and transformation of elements output by the CMS into their Instant Articles counterparts. The transformer ships with a base set of rules for common elements (such as a basic paragraph or an image) that can be extended and customized by developers utilizing the SDK.
  • Client: A simple wrapper around the Instant Articles API, which can be used for publishing Instant Articles on Facebook. The client provides a CRUD interface for Instant Articles as well as a helper for authentication. The client depends on the main Facebook SDK for PHP as an interface to the Graph API and Facebook Login.

Quick Start

You can find examples on how to use Elements, Transformer, and Client in the Quick Start guide.

Installation

The Facebook Instant Articles PHP SDK can be installed with Composer. Run this command:

composer require facebook/facebook-instant-articles-sdk-php

Testing and Developing

Composer is a prerequisite for testing and developing. Install composer globally, then install project dependencies by running this command in the project root directory:

composer install

To run the tests:

./vendor/bin/phpunit

If you change structure, paths, namespaces, etc., make sure you run the autoload generator:

composer dump-autoload

Contributing

For us to accept contributions you will have to first have signed the Contributor License Agreement. Please see CONTRIBUTING for details.

License

Please see the license file for more information.

facebook-instant-articles-sdk-php's People

Contributors

chrisackermann avatar demoive avatar diegoquinteiro avatar everton-rosario avatar gemedet avatar localheinz avatar m4olivei avatar scottrigby avatar simonengelhardt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.