简体   繁体   English

触发Luis意图的Facebook对话

[英]Trigger Facebook dialog on proper Luis intent

I want to use Facebook authentication to my bot. 我想对我的机器人使用Facebook身份验证。 So far, I am following this sample . 到目前为止,我正在关注此示例

I want to trigger the Facebook dialog when some Luis intent is in scope. 当某些Luis意图在范围内时,我想触发Facebook对话框。

For example, I want to something similar to what I have in my MessagesController : 例如,我想要类似于MessagesController

 await Conversation.SendAsync(activity, () => new RootLuisDialog());

but in my Luis dialog: 但是在我的Luis对话框中:

public async Task help(IDialogContext context, LuisResult result)
{
   await Conversation.SendAsync(activity, () => SimpleFacebookAuthDialog.dialog);
}

How to send proper activity to Facebook dialog? 如何发送适当的活动到Facebook对话框?

You need to use context.Call or context.Forward in order to call a child dialog. 您需要使用context.Callcontext.Forward来调用子对话框。

context.Call(SimpleFacebookAuthDialog.dialog, this.ResumeAfterAuth);

You might need to check the MultiDialogs sample to grasp some of the concepts involved. 您可能需要检查MultiDialogs示例以掌握其中涉及的一些概念。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM