2016-12-02 59 views
3

我最近开始通过微软僵尸框架开发Facebook的僵尸工具,我需要的一个关键功能是一个很好的帐户链接系统。当我进行研究时,我只能找到Facebook Messenger平台的教程https://developers.facebook.com/docs/messenger-platform/account-linking 我想知道是否有人知道Microsoft Bot Framework的类似教程,或者我可以找到关于此主题的更多信息,或者是否有人有任何建议。帐户链接微软僵尸框架Facebook教程

在此先感谢

回答

4

即使你使用的是BotFramework,你还是会希望使用Facebook的帐户链接(如上面所示的链接描述)。要启动登录,您需要创建自定义消息:

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" 
       }] 
      }] 
     } 
     } 
     } 
    }); 
+0

感谢您的帮助 –