bootbot icon indicating copy to clipboard operation
bootbot copied to clipboard

How get user location?

Open krasnyd opened this issue 6 years ago • 1 comments

Hi. Messenger allows the user to send their current location. Is there any option to read it by Bootbot? Thank you for your answer.

krasnyd avatar Feb 17 '19 14:02 krasnyd

I've already figured it out.

convo.ask({
...
}, (payload, convo) => {
...
}, [
	{
		event: 'attachment',
		callback: (payload, convo) => {
			const text = payload.message.attachments[0].payload["coordinates"];
			console.log(text);
			console.log("Lat: "+text.lat);
			console.log("Long: "+text.long);
			convo.end();
		}
	}
]);

krasnyd avatar Feb 17 '19 14:02 krasnyd