Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put the CSV keywords into const #2

Merged
merged 1 commit into from
Feb 18, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const TW_CONSUMER_KEY = 'TWITTER-CONSUMER-KEY';
const TW_CONSUMER_SEC = 'TWITTER-CONSUMER-SECRET';
const TW_ACCESS_TOKEN_KEY = 'TWITTER-ACCESS-TOKEN-KEY';
const TW_ACCESS_TOKEN_SEC = 'TWITTER-ACCESS-TOKEN-SECRET';
const CSV_KEYWORDS = 'comma,separated,list,of,keywords,you,want,to,monitor';

var gsheet = new GoogleSpreadsheet('SPREADSHEET-KEY');

Expand All @@ -26,7 +27,7 @@ var client = new Twitter({
});


client.stream('statuses/filter', {track: 'comma,separated,list,of,keywords,you,want,to,monitor'}, function(stream) {
client.stream('statuses/filter', {track: CSV_KEYWOKRDS}, function(stream) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be CSV_KEYWORDS

stream.on('data', function(tweet) {
textapi.sentiment({"text": tweet.text}, function(error, response) {
if (error === null && (response.polarity == 'negative' || (response.polarity == 'neutral' && response.polarity_confidence <= 0.65))) {
Expand Down