Skip to content

Instantly share code, notes, and snippets.

@mranney
Created November 12, 2010 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mranney/673728 to your computer and use it in GitHub Desktop.
Save mranney/673728 to your computer and use it in GitHub Desktop.
var tweasy = require("tweasy")
OAuth = require("oauth").OAuth,
inspect = require('eyes').inspector({
maxLength: 16384
});
var oauthConsumer = new OAuth(
"http://api.twitter.com/oauth/request_token",
"http://api.twitter.com/oauth/access_token",
"", // can't remember what this is
"", // or this
"1.0", null, "HMAC-SHA1");
var twitterClient = tweasy.init(oauthConsumer, {
access_token: "", // get this from twitter web page
access_token_secret: "" // get this from twitter web page
});
var stream = twitterClient.userStream({
replies: "all",
track: "nodejs, node.js, rebelvox, ranney",
locations: "-122.75,36.8,-121.75,37.8"
});
stream.addListener("json", function(json){
console.log(json);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment