From e59c4d314e084ab0d0d19ae7fc23cb85469f4485 Mon Sep 17 00:00:00 2001 From: Ellie Frymire Date: Mon, 10 Sep 2018 18:44:43 -0400 Subject: [PATCH] debugging he quote error --- read_and_reply.js | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/read_and_reply.js b/read_and_reply.js index 2feb8fa..64460e9 100644 --- a/read_and_reply.js +++ b/read_and_reply.js @@ -57,10 +57,12 @@ const makeViz = (data) => { module.exports.read_and_reply = read_and_reply = (tweetEvent) => { let tweeter = tweetEvent.tweet_create_events[0].user.id + console.log(tweetEvent.tweet_create_events[0]) if (tweeter !== 1031985269984165900) { let quoteStatus = tweetEvent.tweet_create_events[0].is_quote_status + console.log(quoteStatus) let id = tweetEvent.tweet_create_events[0].id_str let user = tweetEvent.tweet_create_events[0].user.screen_name let user2 = quoteStatus ? tweetEvent.tweet_create_events[0].quoted_status.user.screen_name : null @@ -81,43 +83,6 @@ module.exports.read_and_reply = read_and_reply = (tweetEvent) => { console.log(body) }) - // if (quoteStatus) { - // let user1 = tweetEvent.tweet_create_events[0].user.screen_name - // let user2 = tweetEvent.tweet_create_events[0].quoted_status.user.screen_name - // let tweet = '@' + user1 + ' ' + '@' + user2 + ' ' + makeViz(parse(tweetEvent.tweet_create_events[0].quoted_status.text)) - - // // request options - // const request_options = { - // oauth: auth.twitter_oauth, - // url: 'https://api.twitter.com/1.1/statuses/update.json?status=' + encodeURIComponent(tweet) + '&in_reply_to_status_id=' + id, - // } - - // // POST request to tweet - // request.post(request_options).then(function (body) { - // console.log(body) - // }).catch(function (body) { - // console.log(body) - // }) - - // } else { - // let user = tweetEvent.tweet_create_events[0].user.screen_name - // let tweet = '@' + user + ' ' + makeViz(parse(tweetEvent.tweet_create_events[0].text)) - - // // request options - // const request_options = { - // oauth: auth.twitter_oauth, - // url: 'https://api.twitter.com/1.1/statuses/update.json?status=' + encodeURIComponent(tweet) + '&in_reply_to_status_id=' + id, - // } - - // // POST request to tweet - // request.post(request_options).then(function (body) { - // console.log(body) - // }).catch(function (body) { - // console.log(body) - // }) - - // } - } } \ No newline at end of file