내 봇에서 사용자에게 위치를 보내려고하십니까? 그게 허용됩니까? 이 경우, 내가 JSON 형식이 정확이 내 코드에 무슨 일이고 나는페이스 북의 메신저로 위치 보내기
오류 : {메시지 : '(# 100) 지원되지 않는 첨부 파일 유형',
2017-01-07T20 : 02 : 00.841002 + 00 : 00 앱 [web.1] : 형식 : 02 : 'OAuthException'
2017-01-07T20
+ 00.841004 00 : 코드 : [web.1] 00 앱 1002017-01-07T20 : 02 : 00.841004 + 00 : error_subcode : 2,018,046,
2017-01-07T20 : 02 : 00.841005 + 00 : 00 앱 [web.1] fbtrace_id [web.1] 00 앱 : 누군가가 컨텍스트를 제공 할 수 있다면 'CObB3 + 0fgMw'} 오류 는
function sendLocationMessage(sender,event){
let messageData={
attachment: {
"type": "location",
"payload": {
"coordinates":{
"lat": event.message.attachments[0].payload.coordinates.lat,
"long": event.message.attachments[0].payload.coordinates.long
} }
}
}
request({
url: 'https://graph.facebook.com/v2.6/me/messages',
qs: {access_token:token},
method: 'POST',
json: {
recipient: {id:sender},
message: messageData,
}
}, function(error, response, body) {
if (error) {
console.log('Error sending messages: ', error)
} else if (response.body.error) {
console.log('Error: ', response.body.error)
}
})
}