帐户链接Microsoft bot框架Facebook教程 [英] Account Linking Microsoft bot framework Facebook Tutorial

查看:200
本文介绍了帐户链接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"
              }]
           }]
         }
        }
       }
    });

这篇关于帐户链接Microsoft bot框架Facebook教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆