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

[Question] Hero Card buttons are not showing on Direct Line(3.0)

Open RaoVenka opened this issue 9 years ago • 4 comments

In my bot code i have added Direct Line Secret key which is mentioned bot framework.

In Direct Lane It is not working buttons (Serach Specific Item , Browse By item and Help") are not shown. image

In Emulator It is working fine and buttons also shown. image

Could you please provide how to resolve above mentioned issue.

Could you please provide how to implement Carousel Cards in Direct Line.Could you provide some samples too.

RaoVenka avatar Jun 21 '17 14:06 RaoVenka

@RaoVenka Are you using .NET or Node SDK?

nwhitmont avatar Jun 21 '17 14:06 nwhitmont

I am using .Net

RaoVenka avatar Jun 21 '17 15:06 RaoVenka

Direct Line is not a visual rendering channel, it is a messaging API. On what channel do the card buttons fail to appear?

nwhitmont avatar Jun 23 '17 17:06 nwhitmont

Is it possible to render hero card with image , buttons and text.Channels its working fine.

I want to show hero card response to direct-line using angular js or jquery.

Below is the response from emulator.

{ "type": "message", "timestamp": "", "localTimestamp": "", "serviceUrl": "", "channelId": "emulator", "from": { "id": "", "name": "Bot" }, "conversation": { "id": "" }, "recipient": { "id": "default-user" }, "membersAdded": [], "membersRemoved": [], "locale": "en-US", "text": "", "attachments": [ { "contentType": "application/vnd.microsoft.card.hero", "content": { "title": "Welcome to SampleChat bot.", "subtitle": " Please select one of the below option.", "images": [ { "url": "https://cdn.pixabay.com/photo/2017/01/06/19/15/soap-bubble-1958650_960_720.jpg" } ], "buttons": [ { "type": "imBack", "title": "Search Item", "value": "Search Item" }, { "type": "imBack", "title": "Browse by Item", "value": "Browse by Item" }, { "type": "imBack", "title": "Help", "value": "Help" } ] } } ], "entities": [], "replyToId": "", "id": "" }

I am using angular Js like if bot is image is the we have shown specific image , if bot is text then related text will be displayed in direct line.

Sample Code :

My Question How to pass above response to angular js like if sending message is hero card then we need to show image,text and buttons (at present only image is shown , already i have shared screen shot also.

Could you please help me to how to get hero card response to direct line.

RaoVenka avatar Jun 29 '17 05:06 RaoVenka