Installing Facebook Instant Articles module on Drupal 8

Facebook Instant Articles is a new feature which helps content publishers to share easier articles from their website to Facebook. Readers can then access that articl easier, page load time is up to 10 times faster then it was before. Since the very beginning, in May 2015, many world's best known publishers such as The New York Times, National Geographic, BuzzFeed, BBC News, etc.. have started using it and have proved just how easy it is use to it, and how useful it is.

Facebook Instant Articles is also available on Drupal 8, as there is a contrib module which makes it easy to set it up. In this tutorial I’ll explain how to install this module, and complete settings to enable Facebook Instant Articles and connect your website with you Facebook page.

What you need to activate this feature, is a website which is hosted on some live server, and a Facebook page.

First step: Download and install module

Facebook Instant Article module is currently available for Drupal versions 7 and 8. You can see it and download it from the official module page here.

Download it and place it in the /modules directory. Later you can see on ‘/admin/modules’ page listed these three modules.

For me the easiest way to install it was using Composer. It’s very simple, just write this command:

$ Composer require 'drupal/fb_instant_articles:^2.0'

. Then you can activate the module.

In case you decide to try without Composer, it’s very possible that you will get an error after activating the module because you are missing some of the Composer components that this module requires. So I am kindly suggesting to use the Composer way.

You need to activate all three modules.

as well as ‘RESTful Web Services’ and ‘Serialization’ modules which Facebook Instant Articles module requires.

Second step: Sign up for Instant Articles

In order to use Facebook Instant Articles, you’ll have to sign up for it first.

This step is very short. All you need is to go to this link, and there choose for which one of yours Facebook pages you want use Instant Articles.

If you don’t see some of the pages, that means that you need to have admin or analyst privileges.

Under ‘Publishing Tools’ of your Facebook page's main menu, you will see in the left side menu a newly created Instant Articles section.

Third Step: Connect your website to the Facebook page

Following the official instructions, which you can see under the Configuration menu item, from the newly created Instant Articles section, you can see that you also need to connect the Facebook page with your website.

That step is easy. All you need to do is to copy a meta tag, that Instant Articles provided for you, and insert it in the head tag of your site.

Also, you need to claim the URL of your website.

Fourth step: Create the Facebook app

You will also need to create a Facebook app, in order to get APP ID keys to connect the Drupal module with Facebook.

On Facebook for developers official website you can create the app. Find the link ‘Add a New App’ which is listed under ‘My Apps’ drop-down menu. When you choose it, you’ll get the next pop-up menu.

The following steps are really easy, you have to fill in the name for your app, and insert your e-mail address. For testing purposes, I gave the name ‘Test FIA’, you can give whatever you want.

Next, you’ll see Facebook app dashboard page, and your APP id and secret app key, but you’re not finished yet. You need to insert some additional information, to make the app public.

In ‘Settings’ menu you need to insert the url of the website you will use, contact email, and Privacy Policy URL, in order to make the app public. The other unpopulated fields are optional.

Next, choose ‘App Review’ option from the left menu and you can finally make your app public. You are ready to use the APP id keys on the module configuration page.

Fifth step: Connect your module with Facebook

Now, you can connect the module with Facebook. Under module settings, there are two sections, Base settings, and API settings.

In base settings section, all you need now is to insert your Facebook page ID.

You can find it under ‘About’ section on your Facebook page.

Second step is to insert your APP id and secret keys. You got them in the previous step.

After this step you will be connect to Facebook, and your website will be finally connected with Instant Articles.

Sixth step: Configure Production RSS feed

We also have to configure Production RSS feed. It’s the list which will include all articles from your website to be viewed as Instant Articles.

The standard Feed URL needs to look something like this:

yourwebsite/rss.xml/instant-articles

Seventh step: Create some test articles, and start publishing

If you have some articles created on your website, by clicking on the production RSS feed, you can see all of them there. Otherwise, if you do not have any created yet, or at least 10 articles created, create some test articles in order to be available to submit them for review and start using Instant Articles.

After you submit articles for review, you will have to wait between 3 and 5 business days for Facebook to verifies them. After that you will receive a message like this:

your articles will be officially verified, and you can start publishing your articles as Instant Articles!

Under Production Articles you can see which articles from your website are available to use as Instant Articles, and their status. You can edit them if needed. Also it is possible that some of your articles would not meet the standard format procedures of Instant Articles, so you will need to fix it.

You can see an example, of the seven articles from my test website included in the production articles feed.

Here you can see some of them on my test website.

If everything worked as planned, you can finally start publishing.

Next steps

You can also configure your article design. As an example you can add a logo, change font size, font family, background color, etc.

There are also options for monetizing your articles.

Conclusion

Facebook Instant Articles is a very useful feature. If you are using it, your readers can easily and quickly access the articles you are sharing through Facebook.

Many useful information about FIA, you can find here:

Lazar Padjan

back to top