Facebook Account Linking with Microsoft Bot Framework

Contents

Introduction

In chatbot scenarios, it is often required to perform some sort of user authentication and authorization. For example, the bot might be doing travel reservations on behalf of the user so it needs the proper credentials to do so.

The Microsoft Bot Framework has some helpers to implement user authentication, for example, the SigninCard. There is also example Node.js code and C# code for authenticating the user. All the approaches work and can be leveraged, but are based on “external authentication flow” meaning performing the authentication outside of the chat context (for example, in a Web browser).

The Facebook Messenger offers a feature where you can perform the user authentication within the Facebook Messenger experience and this is called Account Linking.