Account Linking Microsoft bot framework Facebook Tutorial

后端 未结 1 999
情书的邮戳
情书的邮戳 2020-12-21 10:48

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 researc

相关标签:
1条回答
  • 2020-12-21 11:12

    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"
                  }]
               }]
             }
            }
           }
        });
    
    0 讨论(0)
提交回复
热议问题