Introduction
This repository contains a sample Node.js code to implement Facebook Messenger Account Linking on top of the Microsoft Bot Framework.
Running locally
- Follow the Bot Framework documentation to register a bot and configure it to the Facebook Messenger channel
- Set the following environment variables according to your configuration
BOT_FRONTEND_URL
is the publicly accessible URL to where you host this code, for example, a URL generated by ngrokMICROSOFT_APP_ID
andMICROSOFT_APP_PASSWORD
can be obtained from the Bot Framework developer portalFACEBOOK_PAGE_TOKEN
is the token generated during configuration of the Facebook Messenger bot and is required in the unlink account scenario
npm install
node index.js
- Say "link account" to the bot via Facebook Messenger to start the account linking process