Download the PHP package xima/xima-twitter-client without Composer
On this page you can find all versions of the php package xima/xima-twitter-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package 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
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):
This automatically includes the TypoScript and PageTSconfig.
2. Configure API Credentials
Add the credentials to your extension configuration (e.g., in additional.php):
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:
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
Cleanup Command
Remove tweets (and their associated images) older than a given number of days:
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
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):
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:
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!