帐户链接Microsoft bot框架Facebook教程

问题描述:

我最近开始通过Microsoft Bot框架为Facebook的机器人工作,我需要的一个关键功能是一个很好的帐户链接系统。当我进行研究时,我只能找到一个适用于Facebook Messenger平台的教程 https:/ /developers.facebook.com/docs/messenger-platform/account-linking
我想知道是否有人知道Microsoft Bot Framework的类似教程,或者我可以在这里找到有关此主题的更多信息,或如果有人有意见。

I recently started working on a bot for Facebook through the Microsoft Bot Framework, and one of the key features I need is a good account linking system. When I did research I could only find a tutorial for the Facebook Messenger Platform https://developers.facebook.com/docs/messenger-platform/account-linking I was wondering if anyone knew of a similar tutorial for Microsoft Bot Framework or where I can find more information on this topic, or if anyone has advice.

提前感谢

Cuan

即使您正在使用BotFramework,您仍然要使用Facebook的帐户链接(如上所示链接所述)。要启动登录,您需要创建一个自定义消息:

Even if you are using the BotFramework, you are still going to want to use Facebook's account linking (as described at the link shown above). To initiate the log-in, you'll need to create a custom message:

msg = new builder.Message(session);
msg.sourceEvent({
     facebook: {
        attachment:{
        type:"template",
        payload:{
            template_type:"generic",
            elements:[{
              title:"title",
              subtitle:"subtitle",
              image_url:"https://en.wikipedia.org/wiki/Space_Needle.jpg",
              buttons:[{
                 type:"account_link",
                 url: "https://www.someurl.com/authorize"
              }]
           }]
         }
        }
       }
    });