Closed SerendioSoftwares closed 7 years ago
postback doesnt work???
If you have a look to Rich card documentation (here: https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-add-rich-card-attachments) you will see that you have the following choices (at least):
imBack
= Text of the message to send to the bot (from the user who clicked the button or tapped the card). This message (from user to bot) will be visible to all conversation participants via the client application that is hosting the conversation.
postBack
= Text of the message to send to the bot (from the user who clicked the button or tapped the card). Some client applications may display this text in the message feed, where it will be visible to all conversation participants.
So you should change imBack
to postBack
Thank you for the replies. My problem is with this aspect of postback: " For some channels this may get mapped to a imBack."
I wish to send back a Json object and it would look really odd if it were to appear on the chatbox.
Additionally how do I send a secret message to the chatbot apart from posting the user reply on the screen.
On which channel(s) do you want to send your json?
At the moment, skype and messenger- both dont have this problem. But we plan on expanding to Kik, Slack and as many channels as possible.
And, How do I send a secret message to the chatbot apart from posting the user reply on the screen?
The postBack
action type is the only way to do this, but as you mentioned, only some channels support it.
System Information
Issue Description
The 2nd parameter is displayed as user send-back on Button click in Hero-Card botbuilder. I would communication to occur without an explicit message on the chat screen. For eg: the bottom code could display "Selected" to the user while sending "60" to the bot.
Code Example
builder.CardAction.imBack(session, "60", "$40-$60")