Created
November 26, 2014 05:15
-
-
Save ashumeow/b554c528894e4e94a1cd to your computer and use it in GitHub Desktop.
This file contains hidden or 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 twitter = function() | |
| { | |
| var twit = new twitter({ | |
| consumer_key: 'PtSsmBwqSPtc8zQRDJ3GtbhKj', | |
| consumer_secret: 'CsAsJ8fMDS3EPvhQhLawo8La6MwSiuEm1pAZbEDKDYULQFO513', | |
| access_token_key: '176376243-RgYPr0nf9GWNe7ppxU5fLq9KXbmu5m2AT3qB0Box', | |
| access_token_secret: 'P0V8b94x0Csmw41GubwfI45h9p4gKPNAIWNtMauFtz8vT' | |
| }); | |
| twit.stream('filter', { track: 'dog' }, function (stream) { | |
| stream.on('data', function (data) { | |
| console.log(data.text); | |
| }); | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wait, what? You're setting twit to twitter which you're defining right there? The require('twitter') is what pulls in the dependency on another Node.js module. What I wrote was not pure JavaScript... it was JavaScript on Node.js.