botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Pop up a browser window upon selecting a choice

Open wkk91193 opened this issue 8 years ago • 2 comments

Bot Info

  • SDK Platform: Node.js
  • SDK Version: 3.11.0
  • Active Channels: Facebook
  • Deployment Environment: Azure Bot Service, local development with Emulator

Issue Description

After the user selecting a certain option from builder.Prompts.choice I need to open up a web page on the browser to show up some results. Only one of the options needs to directed to website.How would do this?

wkk91193 avatar Feb 07 '18 06:02 wkk91193

I do not think there is a way to accomplish this with prompt.choice. I would suggest using a Hero card or some other rich card to accomplish this. there is a cardAction type of openUrl. Here is a sample of some rich cards and here is the documentation

new builder.HeroCard(session)
            .title("Google")
            .subtitle("")
            .text("Click button to go to google")
            .buttons([
                builder.CardAction.openUrl("http://google.com")
            ])

JasonSowers avatar Feb 08 '18 18:02 JasonSowers

@JasonSowers I think there's typo when passing params to openUrl method.

wkk91193 avatar Feb 12 '18 10:02 wkk91193