From 434be8a747503582a0338037e910d94aa47ef754 Mon Sep 17 00:00:00 2001 From: briandennis Date: Thu, 14 Sep 2017 21:22:48 -0500 Subject: [PATCH] update twitter handler --- handlers/twitter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/twitter.js b/handlers/twitter.js index 1bd641f..fb44a7a 100644 --- a/handlers/twitter.js +++ b/handlers/twitter.js @@ -9,7 +9,7 @@ const client = new Twitter({ const uploadImage = (data) => client.post('media/upload', { media_data: data }) const uploadTweet = (media) => client.post('statuses/update', { status: 'carbon copy', media_ids: media.media_id_string }) -const extractImageUrl = (stuff) => console.log(stuff.entities.media[0].media_url) +const extractImageUrl = (response) => response.entities.media[0].display_url const respondSuccess = (res, url) => res.json({ url }) const respondFail = (res, err) => {