Social Post X

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

Social Post X allows you to configure your site to automatically tweet to a user account without human intervention.

Social Post X also integrates with the Rules module.

Requirements

  1. drupal/social_post: ^3.0 (that is itself dependent on drupal/social_api: ^3).
  2. abraham/twitteroauth

Update May 2026

As of May 2026, X has moved their API to a pay-per-post model. More information on this here: https://devcommunity.x.com/t/announcing-the-launch-of-x-api-pay-per-use-... . This means the end of free requests when new accounts start to use the API. Although this privilege should remain for existing free tier users, there has been a shift towards encouraging more human interaction on X to the detriment of automated content creation using the API. There have been other changes such as charging to post urls AFAICT. See attached screenshots.

X

X

So although this module should still work, you will probably need to pay for the privilege of using it and getting it working.

Post-Installation

First install and configure this module from /admin/config/social-api/social-post/x

Here you will need to enter the following credentials:

- X Consumer Key (API Key)
- X Consumer Secret (API Secret)
- X OAuth Token (Access Token)
- X OAuth Token Secret (Access Token Secret)

Rules Configuration

Navigate to Configuration > Rules (/admin/config/workflow/rules) and click "Add reaction rule".
Select a React on event value (e.g. "After saving a new content node").
Set a Label for the rule (e.g. "New content node tweet").
Click "Save".
On the rule edit page, click "Add action".
Select the "X Tweet" action under the "Social Post" option group in the Action
field.
Click "Continue".
Input the text to be tweeted -- e.g. A new article "{{ node.title.value }}" has
been published on my website at {{ node | entity_url }}
Click "Save".
Add other conditions and/or actions as desired.
Click "Save".

Similar projects

This module is based on the contributed social_post_twitter module. That module allows multiple Drupal users to log in to a single Drupal instance and link their respective X accounts, allowing them to post new tweets from a single Drupal instance linked to their unique twitter/x handle. This module only enables a single Drupal user (admin) to link their X account and to post content streams under a single account. Also at the time of writing there were some issues with using that module with a basic X tier account. At the time of writing up to 1500 posts can be generated on a basic account tier.

Project information

Releases