Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

facebook-instant-articles-wp

Enable Facebook Instant Articles on your WordPress site.

Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star blank 374f33e4d622a2930833db3cbea26b5d03dc44961a6ecab0b9e13276d97d6682 (1 ratings)
Rated 4.0 out of 5
Subscribe to updates I use facebook-instant-articles-wp


Statistics on facebook-instant-articles-wp

Number of watchers on Github 583
Number of open issues 135
Average time to close an issue 12 days
Main language PHP
Average time to merge a PR 6 days
Open pull requests 81+
Closed pull requests 19+
Last commit over 1 year ago
Repo Created almost 4 years ago
Repo Last Updated over 1 year ago
Size 1.17 MB
Organization / Authorautomattic
Latest Release4.0.6
Contributors5
Page Updated
Do you use facebook-instant-articles-wp? Leave a review!
View open issues (135)
View facebook-instant-articles-wp activity
View on github
Fresh, new opensource launches šŸš€šŸš€šŸš€
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating facebook-instant-articles-wp for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Build Status

Instant Articles for WP

Enable Instant Articles for Facebook on your WordPress site.

Plugin activity

Throughput Graph

Description

This plugin adds support for Instant Articles for Facebook, which is a new way for publishers to distribute fast, interactive stories on Facebook. Instant Articles are preloaded in the Facebook mobile app so they load instantly.

With the plugin active, a new menu will be available for you to connect to your Facebook Page and start publishing your Instant Articles. You'll also see the status of each Instant Articles submission on the edit page of your posts.

A best effort is made to generate valid Instant Article markup from your posts' content/metadata and publish it to Facebook. The plugin knows how to transform your posts' markup from a set of rules which forms a mapping between elements in you source markup and the valid Instant Article components. We refer to this glue between the two as the Transformer Rules.

Built-in to the plugin are many pre-defined transformer rules which aims to cover standard WordPress installations. If your WordPress content contains elements which are not covered by the built-in ruleset, you can define your own additional rules to extend or override the defaults in the Settings of this plugin, under: Plugin Configuration > Publishing Settings > Custom transformer rules.

Feed submission to Facebook

Facebook has a review process where they verify that all Instant Articles are properly formatted, have content consistency with their mobile web counterparts, and adhere to their community standards and content policies. You will not be able to publish Instant Articles in Facebook until your feed has been approved.

It's important to note that if you use meta fields to add extra text, images or videos to your Posts, Facebook will expect you to add these to your Instant Articles output too. This plugin includes hooks to help you do that.

See Facebook's documentation for full details of the submission process.

Facebook requires a minimum number of articles in your feed before they will review it. Once your feed has been approved, new posts will automatically be taken live on Instant Articles, and existing posts will be taken live once you update them.

Installation

  1. Run composer install on the root of the plugin folder. Make sure you have Composer installed.
  2. Upload the folder to the /wp-content/plugins/ directory
  3. Activate the plugin through the 'Plugins' menu in WordPress

Frequently Asked Questions

Why is there content from my post missing in the generated Instant Article?

More likely than not, this is because there is markup in the body of your post that is not mapped to a recognized Instant Article component. On the Edit Post screen for your post, look for additional information about the transformed output shown within the Facebook Instant Articles module located at the bottom of the screen.

Why doesn't my post appear in the list of Instant Articles in the publisher tools? Your posts are imported to your library when they are shared on Facebook for the first time.

Alternatively, you can trigger a manual scrape by pasting your URL on our Share Debugger

Only Instant Articles with URLs in domains you have claimed will show up in the Publishing Tools section. In the Instant Articles module for my post, what does the This post was transformed into an Instant Article with some warnings message mean?

When transforming your post into an Instant Article, this plugin will show warnings when it encounters content which might not be valid when published to Facebook. When you see this message, it is recommended to resolve each warning individually.

What does the No rules defined for ____ in the context of ____ warning mean?

This plugin transforms your post into an Instant Article by matching markup in your content to one of the components available in Instant Articles markup. Although the plugin contains many built-in rules to handle common cases, there may be markup in your post which is not recognized by these existing rules. In this case, you may be required to define some of your own rules. See below for more details about where and how.

How do I define my own transformer rules so that content from my site is rendered appropriately in an Instant Article?

Your custom rules can be defined in the Settings of this plugin, under: Plugin Configuration > Publishing Settings > Custom transformer rules. More detailed instructions about all the options available is documented in the Custom Transformer Rules section of the Facebook Instant Articles SDK.

I know of a custom transformer rule which is pretty common in the community. How can it be included by default in the plugin?

You can propose popular transformer rules to be included in the plugin by suggesting it on GitHub.

How do I post articles to Instant Articles after plugin is installed?

In order to import your posts to your Instant Articles library on Facebook you need to Connect Your Site first. Then either share your posts on your page or use the Sharing Debugger to scrape them. After you have 10 articles imported, you will be able to submit them for review.

How do I change the feed slug/URL if I'm using the RSS integration?

To change the feed slug, set the constant INSTANT_ARTICLES_SLUG to whatever you like. If you do, remember to flush the rewrite rules afterwards. By default it is set to instant-articles which usually will give you a feed URL set to /feed/instant-articles

How do I flush the rewrite rules after changing the feed slug?

Usually simply visiting the permalinks settings page in the WordPress dashboard will do the trick (/wp-admin/options-permalink.php)

Development Environment

You are more than welcome to help us to make this plugin even better!

Setup SDK and WP to use the Github code

Most of development and debugging we use the master or any feature branch for the development of WP plugin. Sometimes it needs specific or newest version of the SDK to match all the new features that are release candidates to every new release of SDK and WP plugin.

The SDK is also under development @ GitHub: https://github.com/facebook/facebook-instant-articles-sdk-php

Pre-requisites

  • Have PHP installed (you can install with homebrew)
  • Have WebServer installed (you can use MAMP)
  • Have WP installed (downloading from wordpress.org)

Setup

Clone both repositories into your developer folder (ex: ~/instant-articles).

git clone git@github.com:Automattic/facebook-instant-articles-wp.git
git clone git@github.com:facebook/facebook-instant-articles-sdk-php.git

Build both source folders:

cd facebook-instant-articles-sdk-php
composer install

cd ../facebook-instant-articles-wp
composer install

Now remove the build from your WordPress, so it will include the code you've just built.

rm -rf vendor/facebook/facebook-instant-articles-sdk-php
ln -s ~/facebook-instant-articles-sdk-php vendor/facebook/facebook-instant-articles-sdk-php

and now you can create a link inside your /wp-content/plugins to your folder

ln -s ~/facebook-instant-articles-wp wp-content/plugins/facebook-instant-articles-wp
facebook-instant-articles-wp open issues Ask a question     (View All Issues)
  • almost 3 years UI ability to turn specify which post should be published as an Instant Article (admin)
  • almost 3 years Metabox to batch include footer text to rendered Instant Articles
  • almost 3 years Feature request: Disconnect from Facebook app
  • almost 3 years Batch update all my Instant articles with a new Analytics Tracker?
  • almost 3 years Articles on Instant Articles on page but are on others' walls
  • almost 3 years Missing Image code in Source Markup
  • almost 3 years Multiple feeds
  • almost 3 years Unpublish a live FBIA
  • almost 3 years Facebook Instant Article For Custom Post Type
  • almost 3 years Playbuzz integration with IA
  • almost 3 years API secret never validated! Wrong secret key causes all kinds of inscrutible bugs!
  • almost 3 years Notify users of useless/invalid transformations
  • almost 3 years Submit for review should send only posts that are published and valid
  • almost 3 years WordPress Multisite - Uncaught ReferenceError: INSTANT_ARTICLES_OPTION_ADS is not defined
  • almost 3 years New version 3.2 not working in Arabic websites
  • almost 3 years New Instant Article Update Error - Plugin page not loading + content images not showing
  • almost 3 years After tried to edit Page settings, Wizard doesn't work anymore (version 3.2)
  • almost 3 years coauthor functionality not working correctly
  • almost 3 years Fatal errors on saving post with no "post_content"
  • about 3 years Uncaught exception 'InvalidArgumentException' error
  • about 3 years Add plugin version to assets for cache invalidation
  • about 3 years Update compat name from Yoast to MonsterInsights
  • about 3 years Source Markup Empty
  • about 3 years Add Vimeo oEmbed support
  • about 3 years Page selection only returns 25 results without pagination options
  • about 3 years Huge conflict between WP instant articles plugin and Other OpenGraph plugins
  • about 3 years Commenting / Like at the Article Level Not Functional
  • about 3 years No rules defined for <div class="sharethefacts"> in the context of InstantArticle
  • about 3 years Change order of operation for FBIA publishing
  • about 3 years Caption for Interactive is not possible
facebook-instant-articles-wp open pull requests (View All Pulls)
  • Update readme from TXT (with mixed markdown) to markdown
  • Fixes #116 encoding problem
  • IA should get unpublished when post type of WP post is changed to unpublished
  • add a category filtering option
  • Ensure that Related Articles are not stripped
  • Adding ability to skip posts
  • Fix for minor spelling error in code comment.
  • add vimeo.com into oEmbed $provider_name
  • oEmbed tweaks and improvements
  • help handling non-latin encoding
  • I18n fixes
  • Support for related articles (and YARPP)
  • Small refactor on the tests
  • Fix notices when registering DOM transformation filters with new priorities
  • Use H1 for header title and cover image caption
  • Fix relative URL issue with oembeds not using absolute URLs
  • Ad de_DE
  • Add GitHub Issue and PR templates
  • Remove hyperlinks beginning with a #
  • Disable publishing for custom post types and pages.
  • Escape ampersands before appending XML
  • Width and Height for SocialEmbed in default rules
  • Support <mark> tag
  • Modify embed filters on the only on Instant Articles feed, not always
  • Fixed statically-called loadHTML()
  • Allow filtering of the post types used in the feed
  • Clearer message when "article is being processed"
  • Check if the global $post object has been set
  • Added support for multiple ads when using "Embed" option for Ads
  • WordPress coding standards fixes
  • fix whitespace in select/optgroup tags
  • always use HTTPS to load JavaScript SDK; update to 2.6
  • Fix whitespace to match WordPress coding standards
  • use v2.6 of Facebook API
  • Update Instant_Articles_Post->_get_the_content() to validate $post->Iā€¦
  • Add development mode support to status meta box
  • Update rules-configuration.json for FB SDK 1.2.0
  • Apply the second argument to `the_title`
  • Token Invalidation flow
  • Migration from old facebook sdk
  • Don't try to load FB embeds compat unless we're in Instant Articles context
  • Only set https src on scripts that have a src attribute
  • Blocks publishing of articles with transformation warnings
  • Wp tests migration
  • Setup Wizard copy updates
  • fix can't use function return value in write context
  • Refactor to use transform string
  • Fixes #205 - Caption in <p> tag
  • Fixes #408 adding rules for gallery
  • Call instant_articles_post_published hook to determine published status
  • Support for Playbuzz plugin
  • Use the instant_articles_post_types filter when registering metaboxes
  • Only load compat layers when we're rendering a feed
  • Added rule configuration for Instagram embed
  • Add instant_articles_should_submit_post filter hook to allow developers control of whether the post should be submitted to IA
  • Update WordPress.com stats code to use FBIA SDK.
  • Created a new Ingestion flow for Instant Articles based on Open Graph
  • Fixes #515 - Enables Playbuzz plugin out of the box
  • V2 review
  • Load more managed pages to choose from
  • Create facebook
  • allow markups in footer/copyright
  • Fix "Empty string supplied as input" bug
  • Fix "PHP Notice: Undefined index: publish_with_warnings"
  • Open Graph Ingestion Flow
  • Adds parameter to format article before ingestion
  • Update rules to work with Instagram embeds
  • Bring in global variables for current blog and post
  • Adds a default PassThroughRule for tag `<sup>`
  • Update Google Analytics compat
  • Renamed from Yoast to MonsterInsights
  • Import drafts as unpublished
  • Fix the way filters are applied in `get_cover_media`
  • Adds hooks for ads and AN placement id
  • Add support for themify
  • (wizard) Update wording about AMP markup gen
  • Implementing Ads Hooks
  • feat(playbuzz): support for the next major playbuzz plugin version
  • Add Image Rule For Lazy Loaded Images
  • [WIP] Enables setup for updating/invalidating articles cache from Facebook scraper
  • Added tranformation warning indicator column
facebook-instant-articles-wp list of languages used
facebook-instant-articles-wp latest release notes
4.0.6 4.0.6

Version 4.0.6

4.0.5 4.0.5

Version 4.0.5

4.0.4 4.0.4

Version 4.0.4

Other projects in PHP