Search code examples
c#botsbotframeworkfacebook-messenger

Bot Framework fails to send FacebookQuickReply ChannelData - How to find cause?


In my bot application I was able to implement quick reply using the same method here. Specifically:

var channelData = new FacebookChannelData();

channelData.QuickReplies = new[]
{
    new FacebookQuickReply(FacebookQuickReply.ContentTypes.Text, "Cathay", "Cathay"),
    new FacebookQuickReply(FacebookQuickReply.ContentTypes.Text, "HK Airlines", "Hong Kong Airlines"),
    new FacebookQuickReply(FacebookQuickReply.ContentTypes.Text, "HK Express", "HK Express")
};

reply.ChannelData = channelData;

...........

public class FacebookChannelData
{
    [JsonProperty("quick_replies")]
    public FacebookQuickReply[] QuickReplies { get; set; }
}

For 1 month I shutdown my bot in the cloud. When I redeployed it the quick replies does not work anymore. How do I find the cause?

My Microsoft.Bot.Builder version has been 3.8.0.0 ever since so I'm surprised the quick reply is not working. I already attached the debugger in my bot deployed to Azure and I did not get any exceptions.


Solution

  • I ended up using the new Suggested Actions. It is still a mystery to me why using the approach I put in my question suddenly stopped working even if I did not change Microsoft.Bot.Builder package. Also it would be great if there is a way to debug this type of error in the MS Bot Framework.