I would like to show the two latest facebook-posts on my Drupal page. I found these two modules: https://www.drupal.org/project/facebook_pull and https://github.com/mysequel/Drupal-8-Facebook-Feed-Module. Unfortunately there is no working Drupal 8 compatibility yet. The first one is in Dev Status and I can't even get it to work. The second generates an error when activating.

What is the Drupal 8 way to import this data from Facebook?


I had a similar requirement (actually a bit more complicated, as I needed Facebook, Twitter and Instagram posts). I ended up creating my own Drupal 8 module - Social Feed Aggregator (https://www.drupal.org/project/social_feed_aggregator).

The module creates a new Social Post content type, allows you to enable each required feed integration, and set up a cron job to refresh the feed data.

You can then simply create a Views block to show the feed data.

  • 1
    I think that you should put this module in drupal.org now you don't need any special process to publish your module. Read this ostraining.com/blog/drupal/opening-the-gates – Adrian Cid Almaguer Apr 10 '17 at 17:04
  • @BrynJ I think your module exactly fits my needs. But I can't properly get it to work. I installed the module on my local environment, put in the facebook app data and enabled it. But while manually running the cron-job from backend afterwards I am getting a 500 Error - same with drush core -cron. I installed it with copy-pasting it into the modules folder. Is the composer-method required to get it to work? – tinytree Apr 10 '17 at 17:28
  • @tinytree - it has this dependency github.com/brynj-digital/social-feed. I normally use this project for a true Composer flavour of Drupal - github.com/drupal-composer/drupal-project - then I can include my module like so composer require brynj-digital/social_feed_aggregator (it sorts out the dependency for me). If you have a vendor folder, place the aforementioned dependency in there. – user34185 Apr 11 '17 at 8:25
  • More info here - drupal.org/docs/develop/using-composer/… and here - drupal.org/docs/8/extending-drupal-8/… – user34185 Apr 11 '17 at 8:33
  • @AdrianCidAlmaguer I may just do that, although the dependency my module has might make the install process still a bit awkward, as the link in my previous comment documents – user34185 Apr 11 '17 at 12:00

Another option and probably the most succeeds is the social feed module


While the migration of existing modules is done you can use the solution proposed at https://www.powr.io/tutorials/how-to-add-facebook-feed-module-to-your-drupal-site. There is a free version https://www.powr.io/plugins/facebook-feed/standalone?id=9305465& that you can configure for the moment.

Here is the description of it (= quote from the linked page):

Facebook Feed is free, mobile responsive, and easy to edit; no code needed! Simply embed Facebook Feed to any page, post, sidebar, or footer. Next, customize it right on the live site. Facebook Feed is free and easy-to-use in no time.

  • The downvoter, can you says where is the problem? I can try to fix it – Adrian Cid Almaguer Apr 10 '17 at 15:15
  • Error message "this is a premium feature, please upgrade". – AdamS Jul 13 '17 at 14:18
  • @AdamS I can't get the point from your comment, but if you want other solution look in the other answer or try to migrate the existing module that appear in the question. – Adrian Cid Almaguer Jul 13 '17 at 14:31
  • I mean that I followed the link in this question and tried to use it, but it kept giving me an error message "this is a premium feature, please upgrade", hence the downvote. I get the impressions this solution is not a Drupal module anyway. I think the other solution is the way to go. – AdamS Jul 14 '17 at 19:51
  • @AdamS it works for me, But is just 1 feed, to add more you need to upgrade, this is the problem. – Adrian Cid Almaguer Jul 14 '17 at 21:38

for the second option (https://github.com/mysequel/Drupal-8-Facebook-Feed-Module), have you install facebook graph sdk instead? please install with below command :

composer require facebook/graph-sdk


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.