최유정

sending location message

Showing 1 changed file with 10 additions and 3 deletions
......@@ -7,6 +7,11 @@ const path = require('path');
const HTTPS = require('https');
const bodyParser = require('body-parser');
var latitude = 37.2429832;
var longitude = 127.0749535;
var locationAdd = "경기 용인시 기흥구 서그내로49번길 13"
var location_name = "카페 서천"
const TARGET_URL = 'https://api.line.me/v2/bot/message/reply'
const tokens = JSON.parse(fs.readFileSync("setting.json"))
......@@ -52,9 +57,11 @@ function sendImage(replyToken, imageUrl) {
"replyToken": replyToken,
"messages": [
{
"type": "image",
"originalContentUrl": imageUrl,
"previewImageUrl": imageUrl
"type": "location",
"title": locationName,
"address": locationAdd,
"latitude": latitude,
"longitude": longitude
}
]
}
......