[C#][Facebook] Persistent Menu with Global Actions
Hello,
Can anyone tell me where can I find some example on how to use new v3.1 Named Dialog Actions feature to implement global actions like help, resulting in a Facebook Persistent Menu?
Thanks,
I don't think BotBuilder has support for that within the library.
I just POSTed the JSON according to Facebook's documentation. For the payload, I used something like "PAYLOAD_DELETE_DATA".
On the SDK, I used a Middleware to listen for incoming payload messages and treated the result/fired up the correct Dialogue.
bot.use({
botbuilder: function (session, next) {
if (PAYLOAD_DELETE_DATA === session.message.text) {
session.beginDialog("/delete");
}
...
I don't think BotBuilder has support for that within the library.
Oh, but it does! V3.1 release notes say: Form Flow for automatically generating a Bot from a C# class for filling in the class and that supports help, navigation, clarification and confirmation. I think the examples are just not yet available.
You should be able to use ChannelData to send the native blob to Facebook - for example, see https://github.com/Microsoft/BotBuilder/issues/1077. @chrimc62 is there any Facebook persistent menu support in FormFlow?
There is no Facebook persistent menu support in FormFlow directly, but you can override the IFormBuilder.Prompter with your own implementation of PromptAsyncDelegate which can do any mapping you like including to Facebook persistent dialogs.