This extension uses the Twitter/X API v2 to import and display tweets. It provides a scheduler command for automated imports and a content element for frontend display.
To use the Twitter API, you need a developer account at developer.twitter.com. Register your application and obtain:
- API Key (Consumer Key)
- API Secret (Consumer Secret)
- Access Token
- Access Token Secret
The database must be configured to use the utf8mb4 charset and collation. The standard MySQL utf8 charset does not support 4-byte characters such as emojis, which are common in tweets. Without utf8mb4, saving tweets containing emojis will produce an SQL error.
composer require xima/xima-twitter-clientDownload the zip file from TYPO3 extension repository (TER).
Add the extension's site set to your site configuration (config/sites/<your-site>/config.yaml):
sets:
- xima/xima-twitter-clientThis automatically includes the TypoScript and PageTSconfig.
Add the credentials to your extension configuration (e.g., in additional.php):
$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['xima_twitter_client'] = [
'api_key' => 'your-api-key',
'api_secret' => 'your-api-secret',
'access_key' => 'your-access-token',
'access_secret' => 'your-access-token-secret',
'image_storage' => '1:Images/Twitter',
];- Create a new SysFolder and enable the "Twitter" module
- Add a new Account record inside this folder
- Enter the Twitter username you want to fetch tweets from
- Configure the maximum number of tweets to fetch
Fetch tweets from all configured accounts:
vendor/bin/typo3 twitter:fetchTweets| Option | Description |
|---|---|
--account, -a |
Fetch tweets for a specific account UID only |
--dry-run |
Validate configuration without fetching tweets |
-v |
Verbose output with detailed error messages |
# Fetch tweets for all accounts
vendor/bin/typo3 twitter:fetchTweets
# Fetch tweets for a specific account
vendor/bin/typo3 twitter:fetchTweets --account=5
# Validate configuration only
vendor/bin/typo3 twitter:fetchTweets --dry-run
# Verbose output for debugging
vendor/bin/typo3 twitter:fetchTweets -vRemove tweets (and their associated images) older than a given number of days:
vendor/bin/typo3 twitter:cleanupTweets| Option | Description |
|---|---|
--lifetime, -l |
Maximum age of tweets in days (default: 180) |
--dry-run |
Preview what would be deleted without actually deleting |
# Remove tweets older than 180 days (default)
vendor/bin/typo3 twitter:cleanupTweets
# Remove tweets older than 90 days
vendor/bin/typo3 twitter:cleanupTweets --lifetime=90
# Preview what would be deleted
vendor/bin/typo3 twitter:cleanupTweets --dry-runYou can set up both the import and cleanup commands as scheduler tasks for automated execution.
Add the Twitter content element to any page to display the imported tweets:
Override the default settings in your site configuration (config/sites/<your-site>/settings.yaml):
plugin:
tx_ximatwitterclient:
settings:
maxItems: 10| Key | Description | Example |
|---|---|---|
api_key |
Twitter API Key | |
api_secret |
Twitter API Secret | |
access_key |
Twitter Access Token | |
access_secret |
Twitter Access Token Secret | |
image_storage |
FAL storage path for downloaded images | 1:Images/Twitter |
Ensure all four API credentials are correctly configured. Use the --dry-run option to validate your configuration:
vendor/bin/typo3 twitter:fetchTweets --dry-runMake sure the configured image_storage path exists and is writable. The path should be a valid FAL combined identifier (e.g., 1:Images/Twitter).
The Twitter API has rate limits. If you encounter rate limit errors, reduce the import frequency or the number of tweets fetched per account.
This project is licensed under GNU General Public License 2.0 (or later).
This extension was made by Maik Schneider. Feel free to contribute!
Thanks to XIMA!


