Overview

This module provides a daemon for consuming the Twitter Streaming API, configurable through your Drupal site and via hooks.

The received tweets are stored via Twitter Module.

Requirements

External Libraries

The following libraries must be placed in the module directory for the daemon to run:

Phirehose

System_Daemon

Installation & Configuration

A Twitter account needs to be specified on the module's configuration settings page after it has been authorized through Twitter Module.

By default the daemon will be run as the Ubuntu Apache user (www-data), but this can be modified for other systems and distros on the settings page.

The daemon can be started manually by executing sudo php twitterstream_daemon.php. Messages will be logged to /var/log/twitterstream.log.

Module Hook

Other modules can provide search terms or user ids to watch via a hook:

<?php
hook_twitterstream_params
() {
  return array(
   
'modulename' => array(
     
'follow' => array(
       
// Twitter user ids (usernames are not allowed)
     
),
     
'track' => array(
       
// Hashtags or single-word search terms
     
),
    )
  );
}
?>

This hook is called on cron run, and the daemon will update soon afterwards.

For more timely changes, a module can update it's own parameters explicitly:

<?php
twitterstream_update_params
('modulename', array(
 
'follow' => array(),
 
'track' => array(),
));
?>

Future Development

  • Implement example module that allows entering static values to follow and track
  • Allow creating Debian/Ubuntu init scripts

Github Mirror

https://github.com/gapple/twitterstream

Downloads

Version Downloads Date Links
7.x-1.x-dev tar.gz (12.97 KB) | zip (16.81 KB) 2013-May-02 Notes

Project Information


Maintainers for TwitterStream

  • gapple - 21 commits
    last: 2 weeks ago, first: 42 weeks ago

Issues for TwitterStream

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Statistics (2 years)
New issues
Open bugs
Participants