BotFramework-WebChat icon indicating copy to clipboard operation
BotFramework-WebChat copied to clipboard

Sample: Send user location

Open serpino opened this issue 8 years ago • 5 comments

Bot Info

  • SDK Platform: .NET Core
  • SDK Version: Core
  • Active Channels: WebChat
  • Deployment Environment: Azure Bot Service, Azure App Service, Bot Emulator

Issue Description

I need to get information about the user's location, (longitude, latitude, browser data, etc.) either through an API call or by receiving a new message or conversationUpdate.

How can I do it?

Thanks!

Note to fixer

There are 2 approaches for this sample:

  • [ ] Add a button on the page to send current location
  • [ ] Add a custom attachment that will request the user for lat/long, for once
    • The custom attachment should have two buttons, one is yes, another is no
    • When "yes" button is clicked, we will send the lat/long (browser may popup a request dialog)
      • If the request dialog is denied, we will notify the bot, same as if "no" button is clicked
    • When "no" button is clicked, we will notify the bot about the denial

serpino avatar May 22 '18 12:05 serpino

Can you help me? please

serpino avatar May 23 '18 08:05 serpino

@serpino, please see the response to you question on the botbuilder repo located here.

stevkan avatar May 24 '18 17:05 stevkan

Would be great to get a JS sample for this -- @stevkan are you interested?

corinagum avatar Nov 29 '18 18:11 corinagum

Related to #1476.

compulim avatar Dec 18 '18 20:12 compulim

I was able to get the latitude and longitude in Bot Framework v4 C# using the React.js web channel using DirectLine API payload and receive the data in the bot in turnContext.Activity,Values.

jagdishkumawat30 avatar Oct 31 '21 17:10 jagdishkumawat30