BotFramework-Composer: Card Action button is not working with hero card in facebook messenger

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}
]  

About this issue

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

Most upvoted comments

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