This project is not covered by Drupal’s security advisory policy.

Integrates the Contentfry social wall platform with Drupal. Contentfry collects posts from social networks, such as Instagram, TikTok and YouTube, in Rooms. This module stores the posts of selected Rooms in Drupal and makes them available to a block, to the theme and to a GraphQL schema. Pages render the stored posts with Drupal templates and never call the Contentfry API.

Features

  • Room selection: the settings form lists the Rooms that the access token can query. Check the Rooms to synchronize. When a Room is unchecked, its stored posts are deleted.
  • Access token in a key: the Contentfry access token is stored with the Key module, so that it stays out of the configuration.
  • Refresh on cron or with Drush: the posts are stored in the contentfry cache bin and refreshed on cron after a configurable interval, or immediately with drush contentfry:refresh. A failed refresh is logged and keeps the posts of the last successful refresh.
  • Posts block: the "Contentfry posts" block shows the posts of a Room, filtered by language, social network and media type, with a maximum number of posts. The language filter can follow the content language of the page, with fallback languages in order of preference.
  • Themeable markup: the posts are rendered with the contentfry-posts.html.twig and contentfry-post.html.twig templates. The module provides no CSS.
  • Cache tags: the block and the GraphQL response are cached with the contentfry_room:ROOM_ID cache tag, which is invalidated when the posts of the Room change.
  • Room per content item: an allowed-values callback for list fields lets editors select one of the synchronized Rooms on a node, a paragraph or another content entity.
  • GraphQL: with the GraphQL module, version 5, the contentfryPosts query returns the posts of a Room, with the same filters as the block and with a limit and an offset, for decoupled front ends.
  • PHP API: the \Drupal\contentfry\PostRepository service returns the stored posts of a Room as typed objects.

Use the module to show a social wall on a page of a Drupal theme, to let editors choose the social wall of a landing page, or to serve the posts to a decoupled front end.

Post-installation

  1. Store the Contentfry access token in a key at Administration > Configuration > System > Keys, with a key provider that keeps the token out of the configuration, such as the Environment or the File provider.
  2. At Administration > Configuration > Web services > Contentfry, select the key, save, and check the Rooms to synchronize. Set the number of posts per Room and the refresh interval.
  3. Run cron or drush contentfry:refresh to fetch the posts.
  4. Place the "Contentfry posts" block, add a list field with the Room callback, or enable the contentfry schema extension on a GraphQL server that uses the composable schema.

The configuration requires the "Administer Contentfry" permission.

The posts are stored in a cache bin. On the default database backend, a cache rebuild deletes them until the next cron run or refresh. A backend that keeps its entries on a cache rebuild, such as the one of the Permanent Cache Bin module, avoids this gap. The README describes how to set it.

Additional requirements

  • Drupal 11.4 or later, or Drupal 12.
  • The Key module.
  • A Contentfry account and an access token for the Contentfry API. Contentfry detects the language of a post only on plans with language detection. Without it, posts have no language, and the language filters match them only through the setting for posts without a language.

Recommended modules

  • GraphQL, version 5, with Typed Data: exposes the posts in a GraphQL schema.
  • Permanent Cache Bin: keeps the stored posts on a cache rebuild.
  • Options, in Drupal core: needed for the list field that selects a Room.

Similar projects

No other project integrates Contentfry. Juicer and Curator IO provide blocks for the Juicer and Curator social wall platforms.

Documentation

The README describes every setting, the block templates and their variables, the GraphQL query and its arguments, and the list field configuration.

Supporting organizations: 
Finances development of the module

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • Project categories: Integrations
  • Created by pfrenssen on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases