Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get user's location while chatting with bots?

I am developing a Bot Framework application that integrates with Slack using Microsoft Bot technology. In the bot project, I was trying to get the user location when the user sends a message.

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

I tried using the Geo location class, however I am not able to add the class reference directly and when I add the external DLL for the Geo location class, Visual Studio throws some errors.

Is there any way to get the users current location in Bots?

like image 682
sateesh Avatar asked May 17 '16 06:05

sateesh


2 Answers

The Bot Framework is getting updated every minute!!!

The Bing location control for Microsoft Bot Framework makes the process of collecting and validating the user’s desired location in a conversation easy and reliable.

The control is available for C# and Node.js and works consistently across all channels supported by Bot Framework.

Check the documentation here.

Click to view the code sample

like image 110
Jyo Fanidam Avatar answered Nov 10 '22 08:11

Jyo Fanidam


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

like image 28
D4RKCIDE Avatar answered Nov 10 '22 08:11

D4RKCIDE