Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How get user location? #169

Open
krasnyd opened this issue Feb 17, 2019 · 1 comment
Open

How get user location? #169

krasnyd opened this issue Feb 17, 2019 · 1 comment

Comments

@krasnyd
Copy link

krasnyd commented Feb 17, 2019

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
Copy link
Author

krasnyd commented Feb 17, 2019

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();
		}
	}
]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant