Toggle navigation
Toggle navigation
This project
Loading...
Sign in
신원형
/
study-or-enjoy
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
최유정
2022-06-05 18:11:25 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4309ec2cd881fc1aa3f77a46c1a5b73635601a9c
4309ec2c
1 parent
c9771f5a
sending location message
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
main.js
main.js
View file @
4309ec2
...
...
@@ -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
}
]
}
...
...
Please
register
or
login
to post a comment