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

Can you use hero cards to create button+text-only cards

Open MironV opened this issue 10 years ago • 1 comments

I want to use cards to create text+buttons-only hero cards without any kind of image. Not specifying an image does not seem to work, the card seem to just fail to be created. I'm trying to recreate the Facebook button template in a channel-agnostic way. I do not need to use postbacks, the buttons all point to URLs.

curl -X POST -H "Content-Type: application/json" -d '{ "recipient":{ "id":"USER_ID" }, "message":{ "attachment":{ "type":"template", "payload":{ "template_type":"button", "text":"What do you want to do next?", "buttons":[ { "type":"web_url", "url":"https://petersapparel.parseapp.com", "title":"Show Website" }, { "type":"postback", "title":"Start Chatting", "payload":"USER_DEFINED_PAYLOAD" } ] } } } }' "https://graph.facebook.com/v2.6/me/messages?access_token=PAGE_ACCESS_TOKEN"

MironV avatar Jul 29 '16 19:07 MironV

Actually this seems to be working now, as long as I provide buttons + text.

MironV avatar Jul 30 '16 00:07 MironV