question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Card Action button is not working with hero card in facebook messenger

See original GitHub issue

Bot info

  • SDK Platform: .NET
  • SDK Version: 3.0.10.
  • Active Channels: WebChat, Facebook
  • Deployment Environment: Azure App Service

Issue Description

  • I created a HeroCard. It have a button (CardAction) to select the item. If the user clicks on the button (the button title should be “click me”), I expect the user to see the response of “click me” intent. After clicking on button in messenger it gives error like “Object Serialized to String. JObject instance expected”.
  • In the emulator it works perfectly. but in messenger it is not getting value, it is getting title as text and giving the above mentioned error.

Code Example

# HeroCard
[HeroCard
  title = Lets Begin
  subtitle = Microsoft Bot Framework
  text = Build and connect intelligent bots to interact with your users naturally wherever they are, from text/sms to Skype, Slack,   Office 365 mail and other popular services.
  image = https://greatsmilesbirmingham.com/wp-content/uploads/2017/09/canstockphoto30606317.jpg
  buttons = @{cardActionTemplate( 'imBack',  'click me', 'click me intent' )}
]
# cardActionTemplate( type,  title, value)
[CardAction
    Types = @{if(type == null, 'imBack', type)}
    Title = @{title}
    Value = @{value}
    Text = @{value}
]  

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:25 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
swaraj27commented, Feb 14, 2020

Screenshot (2) This is my code for Action Button. I am testing this in bot framework emulator it is working fine. But when I m integrating this with facebook messenger and after clicking on the button it is giving error like this. Screenshot_fbmessenger

0reactions
zidaneymarcommented, May 27, 2020

@swaraj27 Hi Swaraj, I will close this issue since the issue could not be reproduced, If you have any questions please reopen this issue and provide more details.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Card Action button is not working with hero card in facebook ...
There seems to be some misunderstanding here. The problem was never that card actions don't render correctly in Facebook Messenger. This ...
Read more >
Node.js Botframework 4 - Hero Card with buttons doesn't work ...
I'm using botframework with Node.js SDK version 4, and i'm try to send an HeroCard to Facebook Messanger. If i send the card...
Read more >
Add card actions in a bot - Teams - Microsoft Learn
The actions do not work while the card is in the compose message box. ... Your bot doesn't receive any notice on which...
Read more >
Generic Template - Messenger Platform - Meta for Developers
The generic template is a simple structured message that includes a title, subtitle, image, and up to three buttons. You may also specify...
Read more >
Using Adaptive Cards with the Microsoft Bot Framework
While Adaptive Cards have not been designed specifically for the Bot ... actions” which remedy the card problem by showing the buttons only ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found