How to get the user's location while communicating with bots?

I am developing a Bot Framework application that integrates with Slack using Microsoft Bot technology. In a bot project, I tried to get the user's location when the user sent a message.

What I'm trying to achieve is that when the user enters the message “Show me nearby hospitals”, I want to get the coordinates of the Geo users and pass them an API that will return a list of hospitals near this place. So, any idea on how to get the user's current location in a Microsoft Bot project?

I tried to use the Geo location class, but I cannot add the class reference directly, and when I add the external DLL for the Geo location class, Visual Studio throws some errors.

Is there a way to get the current location of users in bots?

+6
source share
4 answers

Channels depend on whether they support location information. There is currently no way to get location information for users on Slack. For example, Telegram does. When location data is available, it will be returned in the attachment data structure and in its own channel format in the ChannelData field. Please note that the user needs to choose to send this data (to protect their privacy). A bot developer can send a message to a user requesting that they share their location data, but they cannot receive it from a channel to which the user cannot use it for sharing.

0
source

BobBiller is not currently being processed. I discovered a problem to get standardization on all platforms. As for Slack, they don’t have the ability to send the location as an application in the form of Telegram, Messenger and Kik, so you can use the Google Geocode API to get the coordinates from the string.

0
source

The Bot platform is updated every minute !!!

The Bing control for the Microsoft Bot Framework makes the process of collecting and verifying the desired location of users in the chat easy and reliable.

The control is available for C # and Node.js and works sequentially in all channels supported by the Bot Framework.

Check out the documentation here .

Click to view sample code

0
source

This question is old, but now it is a thing that exists to help with the hope of a location, it will help someone find this answer. https://github.com/Microsoft/BotBuilder-Location

0
source

All Articles