Asynchronous Twitter REST/stream/search client API for node.js.
You can install twitter-ng and its dependencies with npm:
npm install twitter-ng.
var twitter = ;var twit =consumer_key: 'Twitter'consumer_secret: 'API'access_token_key: 'keys'access_token_secret: 'go here';
This example assumes that you use express.
Interaction with other parts of Twitter is accomplished through their RESTful API. The best documentation for this exists at dev.twitter.com. Convenience methods exist for many of the available methods, but some may be more up-to-date than others. If your Twitter interaction is very important, double-check the parameters in the code with Twitter's current documentation.
Note that all functions may be chained:
The stream() callback receives a Stream-like EventEmitter.
Here is an example of how to call the
Here is an example of how to call the 'statuses/filter' method with a bounding box over San Fransisco and New York City ( see streaming api for more details on locations ):
twitter-ng also supports user and site streams: