Last active
August 29, 2015 14:17
-
-
Save mostlyfine/330b71630d47263fd03b to your computer and use it in GitHub Desktop.
usage) coffee twitterstream.coffee #cat
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
| twitter = require 'twitter' | |
| client = new twitter( | |
| consumer_key: 'xxx' | |
| consumer_secret: 'xxx' | |
| access_token_key: 'xxx' | |
| access_token_secret: 'xxx' | |
| ) | |
| option = track: process.argv[2] | |
| client.stream('statuses/filter', option , (stream) -> | |
| stream.on('data', (tweet) -> | |
| console.log("#{tweet.user.name} : #{tweet.text}") | |
| ) | |
| stream.on('error', (error) -> throw error) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment