xima / xima-twitter-client
Import and display tweets
Package info
github.com/xima-media/xima-typo3-twitter-client
Type:typo3-cms-extension
pkg:composer/xima/xima-twitter-client
Requires
- abraham/twitteroauth: ^4.0
- typo3/cms-core: ^13.4 || ^14.0
Requires (Dev)
- armin/editorconfig-cli: ^2.0
- bk2k/bootstrap-package: ^15.0 || dev-master
- clue/phar-composer: dev-symfony7-support
- ergebnis/composer-normalize: ^2.45
- friendsofphp/php-cs-fixer: ^3.6.0
- helhum/dotenv-connector: ^3.2
- helmich/typo3-typoscript-lint: ^3.3
- move-elevator/composer-translation-validator: ^1.3
- nikic/php-parser: ^4.19 || ^5.4
- phpmd/phpmd: ^2.13.0
- ssch/typo3-rector: ^3.9
- typo3/cms-backend: ^13.4 || ^14.0
- typo3/cms-base-distribution: ^13.4 || ^14.0
- typo3/cms-belog: ^13.4 || ^14.0
- typo3/cms-beuser: ^13.4 || ^14.0
- typo3/cms-dashboard: ^13.4 || ^14.0
- typo3/cms-extbase: ^13.4 || ^14.0
- typo3/cms-extensionmanager: ^13.4 || ^14.0
- typo3/cms-felogin: ^13.4 || ^14.0
- typo3/cms-filelist: ^13.4 || ^14.0
- typo3/cms-fluid: ^13.4 || ^14.0
- typo3/cms-fluid-styled-content: ^13.4 || ^14.0
- typo3/cms-form: ^13.4 || ^14.0
- typo3/cms-frontend: ^13.4 || ^14.0
- typo3/cms-impexp: ^13.4 || ^14.0
- typo3/cms-indexed-search: ^13.4 || ^14.0
- typo3/cms-info: ^13.4 || ^14.0
- typo3/cms-install: ^13.4 || ^14.0
- typo3/cms-linkvalidator: ^13.4 || ^14.0
- typo3/cms-lowlevel: ^13.4 || ^14.0
- typo3/cms-opendocs: ^13.4 || ^14.0
- typo3/cms-redirects: ^13.4 || ^14.0
- typo3/cms-reports: ^13.4 || ^14.0
- typo3/cms-rte-ckeditor: ^13.4 || ^14.0
- typo3/cms-scheduler: ^13.4 || ^14.0
- typo3/cms-seo: ^13.4 || ^14.0
- typo3/cms-setup: ^13.4 || ^14.0
- typo3/cms-tstemplate: ^13.4 || ^14.0
- typo3/testing-framework: ^8.2 || ^9.0
This package is auto-updated.
Last update: 2026-03-30 09:39:32 UTC
README
TYPO3 extension xima_twitter_client
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.
Requirements
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.
Install
Composer
composer require xima/xima-twitter-client
TER
Download the zip file from TYPO3 extension repository (TER).
Setup
1. Add Site Set
Add the extension's site set to your site configuration (config/sites/<your-site>/config.yaml):
sets: - xima/xima-twitter-client
This automatically includes the TypoScript and PageTSconfig.
2. Configure API Credentials
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', ];
3. Create Account Records
- 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
Usage
Import Command
Fetch tweets from all configured accounts:
vendor/bin/typo3 twitter:fetchTweets
Command Options
| 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 |
Examples
# 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 -v
Cleanup Command
Remove tweets (and their associated images) older than a given number of days:
vendor/bin/typo3 twitter:cleanupTweets
Command Options
| Option | Description |
|---|---|
--lifetime, -l |
Maximum age of tweets in days (default: 180) |
--dry-run |
Preview what would be deleted without actually deleting |
Examples
# 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-run
Scheduler Task
You can set up both the import and cleanup commands as scheduler tasks for automated execution.
Content Element
Add the Twitter content element to any page to display the imported tweets:
Configuration
Site Settings
Override the default settings in your site configuration (config/sites/<your-site>/settings.yaml):
plugin: tx_ximatwitterclient: settings: maxItems: 10
Extension Configuration
| 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 |
Troubleshooting
API Authentication Errors
Ensure all four API credentials are correctly configured. Use the --dry-run option to validate your configuration:
vendor/bin/typo3 twitter:fetchTweets --dry-run
Image Storage Errors
Make sure the configured image_storage path exists and is writable. The path should be a valid FAL combined identifier (e.g., 1:Images/Twitter).
Rate Limiting
The Twitter API has rate limits. If you encounter rate limit errors, reduce the import frequency or the number of tweets fetched per account.
License
This project is licensed under GNU General Public License 2.0 (or later).
Contribute
This extension was made by Maik Schneider. Feel free to contribute!
Thanks to XIMA!


