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

[Facebook Messenger] Set ChannelData for Facebook

Open Lipa9963 opened this issue 9 years ago • 1 comments

When i try to set the ChannelData on facebook i find that if I do not attach any Attachments then Facebook not show What I attached in the ChannelData. for example:

if i send this:

var channelData = new JObject(); var child = new JObject(); child.Add("content_type", "text"); child.Add("title", "Red"); child.Add("payload", "DEVELOPER_DEFINED_PAYLOAD_FOR_PICKING_RED"); channelData.Add("quick_replies", new JArray(child));

var replyOrder = context.MakeMessage(); var attachments = CardFactoryFacebook.GetMainContactThumbnailCard(); //any ThumbnailCard replyOrder.Attachments.Add(attachments); replyOrder.ChannelData = channelData; await context.PostAsync(replyOrder);

so in this case we will see in the messenger the ThumbnailCard and Immediately below the The button i made in the ChannelData "Red".

But if i set the ChannelData without add any Attachments so Does not show anything in messenger e.g:

var replyOrder = context.MakeMessage(); replyOrder.ChannelData = channelData; await context.PostAsync(replyOrder);

Am i missing something ? Thanks

Lipa9963 avatar Mar 01 '17 15:03 Lipa9963

@Lipa9963 are you using C# or Node SDK for BotBuilder?

nwhitmont avatar Apr 18 '17 21:04 nwhitmont