GithubHelp home page GithubHelp logo

facebook-gad / facebook-instant-articles-sdk-extensions-in-php Goto Github PK

View Code? Open in Web Editor NEW

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

0.0 1.0 0.0 1.08 MB

Facebook Instant Articles SDK Extensions in PHP.

Home Page: https://www.facebook.com/facebookmedia/blog/instant-articles-sdk-extension-now-supports-google-amp-soon-apple-news

License: Other

PHP 55.48% CSS 0.91% HTML 43.61%

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

Facebook Instant Articles SDK Extensions in PHP

Build Status Latest Stable Version

The Facebook Instant Articles SDK Extensions in PHP provides a native PHP interface for converting valid Instant Articles into AMP. This gives developers the ability to have AMP content right after getting his own Instant Article markup format ready.

The Extension package consists of:

  • Environment: PHP >= 5.4
  • Dependencies: It relies solely on the Instant Articles SDK and its dependencies to get the Instant Article markup format available into the Elements object tree structure. It also depends on Composer dependency manager.
  • AMP: The AMP transformation was based on the current implementation and definition from AMP project.

Quick Start

$ composer require facebook/facebook-instant-articles-sdk-extensions-in-php

After the installation, you can include the auto loader script in your source with:

require_once('vendor/autoload.php');

Also be sure to check the quick start example.

Official Documentation

You can find examples on how to use the different components of this SDK to integrate with your CMS in the Quick Start Guide of the documentation.

Contributing

Clone the repository

$ git clone https://github.com/facebook/facebook-instant-articles-sdk-extensions-in-php.git

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

$ composer install

To run the tests:

$ composer test

To fix and check for coding style issues:

$ composer cs

Extra lazy? Run

$ composer all

to fix and check for coding style issues, and run the tests.

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

$ composer dump-autoload

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


Troubleshooting

If you are encountering problems, the following tips may help in troubleshooting issues:

  • If your images are having dimension/aspect ratio problems, please check the the quick start example for more information.
  • At the moment, we have no way to determine a video's width and height, you need to explicitly pass that information via properties, see how to do it here.

Filing an issue

Issue template:

# Issue Data
Instant Article Canonical URL: `http://yourdomain.com/path/article.html`
Exported Style JSON: `{...}`
Page ID: `12345`

# Problem noticed
1. Image XYZ missing

# Expected result
1. The Image XYZ should be present.

License

Please see the license file for more information.

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

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.