Question : How to send native Facebook card asynchronously
Hi, I would like to send a native fb card, using bot.send(), Can you please tell me what I am doing wrong below,
var nativeMsg = new builder.Message(); var nativeMsg2 = nativeMsg.sourceEvent(args); bot.send(nativeMsg2);
"args" is JSON, {"facebook": {"notification_type": "REGULAR","attachment": {"type": "template","payload": {"template_type": "generic","elements": [{"title": "Some Title", "image_url": "http://docs.botframework.com/images/demo_bot_image.png","subtitle": "Some amazing subtitle","buttons": [{"type": "postback","title": "GO", "payload": "demo"}]}]}}}}
ps: I dont have session object in this call, its invoked asynchronously as a pro-active message
Try sending just the inner part of the json: {"notification_type": "REGULAR","attachment": {"type": "template","payload": {"template_type": "generic","elements": [{"title": "Some Title", "image_url": "http://docs.botframework.com/images/demo_bot_image.png","subtitle": "Some amazing subtitle","buttons": [{"type": "postback","title": "GO", "payload": "demo"}]}]}}}
Did you get this to work? You DO need the outer "facebook": part
Hi Steve I just got it to with this weekend Yes the outer part is needed
Thanks
On Sat, Nov 26, 2016 at 12:52 AM Steven Ickman [email protected] wrote:
Did you get this to work? You DO need the outer "facebook": part
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/BotBuilder/issues/1686#issuecomment-263046014, or mute the thread https://github.com/notifications/unsubscribe-auth/AFbZaHnaEf-KMDX0jge5c47EOVXHFwB8ks5rB8kXgaJpZM4K1PEu .
It sounds like your problem is solved, so I am closing this issue.