Skip to content

Instantly share code, notes, and snippets.

@tanepiper
Created June 22, 2012 12:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tanepiper/50a5b30d05310fd41261 to your computer and use it in GitHub Desktop.
instance.sockjs.on('connection', function(stream) {
var d = dnode({
auth : function (token, cb) {
console.log(token, instance.tokens);
var u = instance.tokens[token];
if (!u) return cb('Invalid Token');
var t = instance.tokens[token].twitter = new twitter(u.oauth);
cb(null, {
updateStatus: function(tweet, cb) {
t.updateStatus(tweet.status, tweet, cb);
},
retweetStatus: function(id, cb) {
t.retweetStatus(id, cb);
}
});
//cb (null);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment