엄성진

Add Sending Thumbnail

...@@ -5,6 +5,7 @@ exports.check = function(message,replyToken){ ...@@ -5,6 +5,7 @@ exports.check = function(message,replyToken){
5 'tp1uoFAfgHE', 'Qx22TnVVIfU', '3y1QIqR115A', 'VXBI1wt8XII', 'aWMBn2--E0Q', 'HyTbgBlnLCo']; 5 'tp1uoFAfgHE', 'Qx22TnVVIfU', '3y1QIqR115A', 'VXBI1wt8XII', 'aWMBn2--E0Q', 'HyTbgBlnLCo'];
6 6
7 const request = require('request'); 7 const request = require('request');
8 + const fs = require('fs');
8 const TARGET_URL = 'https://api.line.me/v2/bot/message/reply' 9 const TARGET_URL = 'https://api.line.me/v2/bot/message/reply'
9 //라인 고유 토큰 10 //라인 고유 토큰
10 const TOKEN = 'Kb1/rQYz4MUhF8XyKQv7z9x0MxVQ5bX/XO8S/yt/1qQEJVAbsEFAaMvXKEOx9Umr7KhivfyDPfZHRRLFPngR0O4ZGWV2VFses8ufPE7uAdvYr4G6keBNAU69nBz5IC71HfbIrUHxXYqD7GfhVwXzpwdB04t89/1O/w1cDnyilFU=' 11 const TOKEN = 'Kb1/rQYz4MUhF8XyKQv7z9x0MxVQ5bX/XO8S/yt/1qQEJVAbsEFAaMvXKEOx9Umr7KhivfyDPfZHRRLFPngR0O4ZGWV2VFses8ufPE7uAdvYr4G6keBNAU69nBz5IC71HfbIrUHxXYqD7GfhVwXzpwdB04t89/1O/w1cDnyilFU='
...@@ -50,6 +51,11 @@ exports.check = function(message,replyToken){ ...@@ -50,6 +51,11 @@ exports.check = function(message,replyToken){
50 "messages": 51 "messages":
51 [ 52 [
52 { 53 {
54 + "type": "image",
55 + "originalContentUrl": "https://img.youtube.com/vi/"+ids[rand_0to9]+"/hqdefault.jpg",
56 + "previewImageUrl": "https://img.youtube.com/vi/"+ids[rand_0to9]+"/hqdefault.jpg"
57 + },
58 + {
53 "type": "text", 59 "type": "text",
54 "text": sendMessage 60 "text": sendMessage
55 } 61 }
......