Reputation: 3
I'm creating a emergency chatbot in dialogflow that can get the location of the user.
So what I'm trying to achieve is to get the Latitude and Longitude from that location like how and store it in variable like this
var lat = latitude
var long = longitude
Upvotes: 0
Views: 928
Reputation: 36
Create a custom follw-up intent with event input called FACEBOOK_LOCATION, then the lat and lng is set in context facebook_location, you can print this in a dialwoflow response with "lat: #facebook_location.lat, long: #facebook_location.long"
Image example:
Upvotes: 1
Reputation: 266
you can get information from webhook event in payload.coordinates property
reference : https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies
Upvotes: 1