Created
October 17, 2012 20:54
-
-
Save paulomcnally/3908113 to your computer and use it in GitHub Desktop.
hashtag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var WebSocket = require("socket.io").listen( 6969 ); | |
WebSocket.sockets.on("connection", ws_start); | |
function ws_start(data) | |
{ | |
data.on("new_message", ws_sendData); | |
} | |
function ws_sendData(data) | |
{ | |
WebSocket.sockets.emit("ws_getData",data); | |
} | |
var Twit = require('twit') | |
var T = new Twit({ | |
consumer_key: 'bgagV15hh0V5TRZRRC550g' | |
, consumer_secret: 'xtagcguE808KdNLOSXcVViahjL9Wx4zt1tMSE9B6Qg' | |
, access_token: '51550582-EFtdro4uiEPHhhAymkmjoapwntRMwZzISYogTdmyg' | |
, access_token_secret: 'KmuV6aGajIqaw88H6rzaasYLyJyYhWY2oOCShZJJcAE' | |
}) | |
/* | |
var stream = T.stream('statuses/filter', { track: '#TECHOHangout' }) | |
stream.on('tweet', function (tweet) { | |
ws_sendData( tweet ); | |
console.log(tweet) | |
}) | |
*/ | |
var stream = T.stream('statuses/filter', { track: '#NoMasPobreza' }) | |
stream.on('tweet', function (tweet) { | |
ws_sendData( tweet ); | |
console.log(tweet) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment