Twitternode creates nodes from a specified Twitter feed. It downloads new content from the feed each time cron runs. Nodes created by Twitternode are standard Drupal nodes, and thus can be extended by CCK, included in Views, etc.
Twitternode attempts to play nice with the Twitter API and only requests the most recent status updates. Also, because it keeps the updates as nodes, it effectively functions as a local cache of that Twitter account. Other modules and widgets tend to grab the latest updates straight from Twitter on each page load, which I find incredibly wasteful.
Some potential uses of Twitternode include:
- Implementing a "news feed" that aggregates several different services' feeds, including Twitter.
- Keeping a local backup of a corporate Twitter feed.
- Seamlessly integrating your Twitter feed with your site's other community features (comments, Google Friend Connect widgets, etc.).
Requirements
Installation
- Copy the Twitternode module files to your site's modules directory, or "/sites/all/modules." Enable the module in your site administration.
- Once the module has been installed, navigate to Admin » Configuration » Twitternode.
Initial setup & use
- Click "Add Account" and provide a Twitter username. For the current version, this account must be public — private (locked) feeds are not supported.
- If you want this feed to be downloaded with the next cron run (which you probably do), make sure it is Enabled.
- Select a corresponding Drupal user to set as owner of the Twitternode nodes.
- (optional) Set the Default Publishing Options and the Default Node Title Options.
- (optional) Choose how to handle the '@' Replies. You can treat them normally, treat them normally but mark as unpublished, or ignore them completely. Note: If you're not sure, set them to be imported, but unpublished. This way you still have them in the database if something were to be flagged incorrectly.
- Make sure the Frequency is set to "Every time cron runs." Future versions will support varying import schedules.
- (optional) You can choose to save the downloaded XML from Twitter. Useful for debugging or troubleshooting, but also useful if additional processing is desired. If you're running into problems with the feed, try enabling this and inspecting the output.
- (optional) If the Taxonomy module is installed & enabled, additional Taxonomy options are available:
- You can create a vocabulary & terms for the account name(s). This is useful when importing several different accounts with this module. Otherwise, they are all imported as the same content type (twitternode) and it may be difficult to separate them later.
- You can create a vocabulary & terms for the status update source (e.g., "txt", "web", "Twitterrific").
- You can create a vocabulary & terms for when a status update is "favorited" by the owner.
Caveats
This was initially written for internal use at benclark.com, and some features are not necessarily fully implemented or bug free. Still, the codebase is in active use (see Twitter archive), and if something should come up there, the bug will be squashed in short order.
I did not do an exhaustive analysis of Drupal's existing contributed offerings for Twitter, so it's possible that my module duplicates the functionality of another module — a big no-no in the Drupal community! — and in light of that, I'm releasing it at benclark.com first, rather than at drupal.org.