Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Twitter Profile Widget

Security covered Obsolete 119 sites

This module allows you to display tweets from a specific Twitter handle, timeline, or search term in a Drupal block. You can customize the number of tweets shown and whether to include replies or retweets, all while using a single set of Twitter app credentials.


Easily display tweets filtered by Twitter handle, timeline, or search term in a Drupal block. You can control how many tweets should display and whether to include replies or retweets.

A single set of Twitter app credentials is used site-wide, but each block instance can display different tweets with different display settings.

This module uses the application only (read-only access to public information) via the Twitter API.

By design, theming is minimal. Developers are expected to customize the display via their chosen theme.

Configuration

  1. You first need a Twitter App. Sign in to Twitter and go to https://apps.twitter.com/ . Copy the "key" and "secret" associated with your new app.
  2. After installing the module in Drupal, go to Configuration > Media > Twitter Widgets (admin/config/media/twitter_profile_widget). Enter the Twitter App key and secret you created in step 1.
  3. Go to Admin > Structure > Block Layout > Custom Block Library > Add custom block (/block/add) and create one or more widgets.

Staying secure

Your Twitter app consumer key and consumer secret will be stored in a Drupal configuration entity. If using version control and configuration management, use a tool such as config_ignore and config_exclude to prevent exposing your Twitter app credentials, or a Drupal core solution such as $settings['config_exclude_modules'].

For non-UI management & deployment across environments, consider referencing these credentials through the filesystem, either through reference via settings.php or the equivalent:

$path = 'sites/default/files/private/twitter.json';
if (file_exists($path)) {
  $json_text = file_get_contents('sites/default/files/private/twitter.json');
  $twitter_widget = json_decode($json_text, TRUE);
  $config['twitter_profile_widget.settings']['twitter_widget_key'] = $twitter_widget['twitter_widget_key'];
  $config['twitter_profile_widget.settings']['twitter_widget_secret'] = $twitter_widget['twitter_widget_secret'];
}
Drupal 9–10 · not 11

Ask your assistant about Twitter Profile Widget

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • block_content Drupal core >=9.1
  • system Drupal core >=9.1

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Feb 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
3.1.3 Stable 9–10 Mar 9, 2023
3.x-dev Dev 10–11 Mar 9, 2023
3.1.2 Stable 9–10 Feb 6, 2023