Overview

The Media Entity Facebook module provides the ability to embed facebook
posts (including posts, images and videos) using the Drupal's media module.

This module is very similar to Media Entity Instagram.

Installation

Module requires Drupal 9.3 or newer.

1. Enable module
2. create Facebook media type
- Go to /admin/structure/media/add
- set Name to Facebook
- set Description to Facebook posts.
- set Media source to Facebook
- click Save
3. set formatter for field Facebook to "Facebook embed" if it's not set already.
4. (optional) set form widgets and form fields at /admin/structure/media/manage/facebook/form-display.
5. set permissions for editing Facebook media /admin/people/permissions

Configuration

Since 4.0.0, you can now use Embedded Posts to generate the embedded content (see /admin/config/media/facebook-settings). It can be used without app review for everyone. If you update from older versions and wish to switch to this easier alternative, you must set that option manually as updating won't change that due to backwards compatibility.

If you still wish to use the Facebook Oembed API which was used in older versions of this module, visit /admin/config/media/facebook-settings and provide a Facebook app
ID and secret. Also, according to the Facebook API rules, your Facebook app must go through an app review to get access to the Oembed Read permission. This is required for interacting using Facebook's oEmbed API. Also, if you managed to get the permission please help us with testing out cookie consent functionality with oEmbed API at #3385553: Check if it still works when rendering post with Facebook Oembed API.

Privacy and cookies

Don't forget that with this, you embed external content via iframe. That means it will load Facebook's 3rd party cookies for the visitors. In certain countries (for example in Europe) by law you cannot load non-essential cookies to the browser until the visitor has given consent to it. So you'll need: COOKiES Media Entity Facebook for version 4.0.0 or later.

Supporting organizations: 
Initial development

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • Module categories: Media
  • chart icon1,057 sites report using this module
  • Created by dawehner on , updated
  • shieldStable releases for this project are covered by the security advisory policy.
    Look for the shield icon below.

Releases