This project is not covered by Drupal’s security advisory policy.

Who should care?

This module provides a domain-aware Twitter block. If you have domains and want tweets to be displayed, this block may help you get there. If you don't know what domains are, you'll probably be happier with one of the many other Twitter modules available for Drupal.


This module provides a domain-aware block which retrieves and displays a tweet. The tweet displayed can be configured on a per-domain basis and will display one of the following: the latest tweet posted by a specified user or the latest tweet matching a specified search term.

The only data stored on the database are configuration data; this code generates JavaScript to fetch tweets directly from Twitter. This means that Domain Tweets won't increase the running time of cron jobs, but it also means that it's not possible to directly verify which tweets clients are seeing.


  • Uncompress the Domain Tweets tarball into your modules directory (e.g. sites/all/modules).
  • Go to admin/build/modules/list and enable Domain Tweets.
  • Edit the default query at admin/settings/domain_tweets according to what you want to be displayed.
    • "Edit Default Query" ->
    • Name: This is only used in the administrative interface. Users will never see this value.
    • Twitter Username or search term: what to look for
    • Use as: use the previous word for a Twitter search or a Twitter username. Return the latest tweet matching that search or by that user.
  • Sites which use this query: The tweet will show up for these neighborhoods.
  • "Disable Domain Tweets for all neighborhoods?" - Display of Domain Tweets blocks is reversibly disabled.
  • Create a new query - Do that. If you don't assign any neighborhoods, it won't be created.
  • Domain Tweets is now enabled but will not appear until its block is placed. Go to admin/build/block/list to do so.
  • Domain Tweets can also work with panels with no additional changes.


  • All interaction with Twitter happens in the browser.
  • HTML is in a self-contained template. Necessary JavaScript and CSS are included.
  • Groups of domains can be managed together.
  • The tweet can be managed as a block or as a panel.


Custom theming is not currently possible. The html and css are separated into
a template file, though, and I'm accepting patches.


Domain Tweets uses different APIs for user and search terms queries. Username queries are subject to rate-limiting on a per-client basis. If you are seeing "Twitter is not available." for queries that previously worked, this is probably why. Note that this will not affect users unless they are making
frequent use of Twitter's search api. The term search API does not have this limitation.

The timestamp is managed by the timeago jQuery plugin. I've done my best to turn what Twitter returns into something that timeago understands, but Twitter doesn't seem to document the format they use (and there are at least two different ones) or guarantee that it will remain stable.

Project information