Skip to content
This repository

Twitter API client library for node.js

This branch is 0 commits ahead and 0 commits behind master

Update timeline resources

Add getRetweetedToUser() and getRetweetedByUser(), deprecated
getPublicTimeline() and getFriendsTimeline()
latest commit 5fa1af0d15
Jeff Waugh authored
Octocat-spinner-32 lib Update timeline resources March 11, 2012
Octocat-spinner-32 test update memory.txt output to compare node 0.2.5 and 0.3.2 December 30, 2010
Octocat-spinner-32 .gitignore Ignore vim swap files March 10, 2012
Octocat-spinner-32 .npmignore Ignore vim swap files March 10, 2012
Octocat-spinner-32 LICENSE The big shift from twitter-node to node-twitter. October 17, 2010
Octocat-spinner-32 Nicer links for @technoweenie March 07, 2012
Octocat-spinner-32 index.js move more firmly away from node-twitter as npm/lib name December 23, 2010
Octocat-spinner-32 package.json Tidy up readme March 07, 2012

Twitter API client library for node.js

node-twitter aims to provide a complete, asynchronous client library for the Twitter API, including the REST, search and streaming endpoints. It was inspired by, and uses some code from, @technoweenie's twitter-node.


You can install node-twitter and its dependencies with npm: npm install twitter.

Getting started

It's early days for node-twitter, so I'm going to assume a fair amount of knowledge for the moment. Better documentation to come as we head towards a stable release.

Setup API (stable)

var util = require('util'),
    twitter = require('twitter');
var twit = new twitter({
    consumer_key: 'STATE YOUR NAME',
    consumer_secret: 'STATE YOUR NAME',
    access_token_key: 'STATE YOUR NAME',
    access_token_secret: 'STATE YOUR NAME'

Basic OAuth-enticated GET/POST API (stable)

The convenience APIs aren't finished, but you can get started with the basics:

twit.get('/statuses/show/27593302936.json', {include_entities:true}, function(data) {

REST API (unstable, may change)

Note that all functions may be chained:

    .verifyCredentials(function(data) {
    .updateStatus('Test tweet from node-twitter/' + twitter.VERSION,
        function(data) {

Search API (unstable, may change)'nodejs OR #node', function(data) {

Streaming API (stable)

The stream() callback receives a Stream-like EventEmitter:'statuses/sample', function(stream) {
    stream.on('data', function(data) {

node-twitter also supports user and site streams:'user', {track:'nodejs'}, function(stream) {
    stream.on('data', function(data) {
    // Disconnect stream after five seconds
    setTimeout(stream.destroy, 5000);



  • Complete the convenience functions, preferably generated
  • Fix ALL THE THINGS! on the GitHub issues list
Something went wrong with that request. Please try again.