Showing
1 changed file
with
10 additions
and
3 deletions
... | @@ -7,6 +7,11 @@ const path = require('path'); | ... | @@ -7,6 +7,11 @@ const path = require('path'); |
7 | const HTTPS = require('https'); | 7 | const HTTPS = require('https'); |
8 | const bodyParser = require('body-parser'); | 8 | const bodyParser = require('body-parser'); |
9 | 9 | ||
10 | +var latitude = 37.2429832; | ||
11 | +var longitude = 127.0749535; | ||
12 | +var locationAdd = "경기 용인시 기흥구 서그내로49번길 13" | ||
13 | +var location_name = "카페 서천" | ||
14 | + | ||
10 | 15 | ||
11 | const TARGET_URL = 'https://api.line.me/v2/bot/message/reply' | 16 | const TARGET_URL = 'https://api.line.me/v2/bot/message/reply' |
12 | const tokens = JSON.parse(fs.readFileSync("setting.json")) | 17 | const tokens = JSON.parse(fs.readFileSync("setting.json")) |
... | @@ -52,9 +57,11 @@ function sendImage(replyToken, imageUrl) { | ... | @@ -52,9 +57,11 @@ function sendImage(replyToken, imageUrl) { |
52 | "replyToken": replyToken, | 57 | "replyToken": replyToken, |
53 | "messages": [ | 58 | "messages": [ |
54 | { | 59 | { |
55 | - "type": "image", | 60 | + "type": "location", |
56 | - "originalContentUrl": imageUrl, | 61 | + "title": locationName, |
57 | - "previewImageUrl": imageUrl | 62 | + "address": locationAdd, |
63 | + "latitude": latitude, | ||
64 | + "longitude": longitude | ||
58 | } | 65 | } |
59 | ] | 66 | ] |
60 | } | 67 | } | ... | ... |
-
Please register or login to post a comment