TwitterX is a MODX extra that loads Twitter statuses, timelines and basic Twitter searches by using the new (and very annoying) Twitter 1.1 API.
Multiple users using &screen_name
Thanks to Huub van der Voort (@hvoort), TwitterX now supports multiple screen_name values. This can be done by specifying a comma-separated list of Twitter usernames:
This still supports single screen_names should you only want one. By not specifying a screen_name, it defaults to the user that created the API keys.
Basic Twitter Searches
TwitterX has been updated to now support basic Twitter searches by using the new parameter &search. When using this parameter, screen_name and timeline are ignored.
This query will be cached as before but can be run much more frequently as this type of query doesn't use the API authentication so is not restricted by the Twitter request limitations. Here's an example of how this looks:
- TwitterX Error: Could not load tweets as Twitter responded with the error: 'Could not authenticate you.'.
Bringing in multiple feeds
Something not mentioned in the last update is that TwitterX now allows you to bring in multiple feeds in separate calls. This can be done by specifying a unique value for &cache_id. TwitterX caches the Twitter data by using the resource ID and if you have more than one TwitterX call on one page, it will think it has already cached the data and will show the first one multiple times. Get around this by adding a unique id for each snippet call:
- An error in the code was preventing the snippet from outputting errors. This has been corrected and should let you know if there was an error when trying to load the Twitter data.
- A problem reported by Sean Lang meant that Twitter topic links where not working correctly and creating 404s because Twitter changed the URL.