Skip to content

Instantly share code, notes, and snippets.

@cronopio
Created December 10, 2011 02:31
Show Gist options
  • Save cronopio/1454337 to your computer and use it in GitHub Desktop.
Save cronopio/1454337 to your computer and use it in GitHub Desktop.
My Twitter client for shell using nodejs and ntwitter
node_modules/
module['exports'] = {}
#!/usr/bin/env node
var twitter = require('ntwitter'),
colors = require('colors'),
keys = require('./keys'),
tc = new twitter(keys);
tc.verifyCredentials(function(){});
tc.search('node.js',function(error, data){
data.results.forEach(function(msg){
var nick = '@' + msg.from_user;
var tweet = new String(msg.text);
console.log(nick.green + ' >> ' + tweet.blue);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment