Users will access your bot from a Facebook Page. To connect the bot, you'll enable Facebook Messenger on the Facebook Page and then connect the bot to the Page.
You now have your app information and a token for the next step. Leave the Facebook setting steps pending. You'll update them later.
Make your Facebook app public
Submit for review
After the bot is finished, Facebook has its own review process for apps that are published to Messenger. The bot will be tested to ensure it's compliant with Facebook's Platform Policies.
Make the app public and publish the Page
Until an app is published, it's in Development Mode. Plugin and API functionality will only work for admins, developers, and testers.
After the review is successful, in the App Dashboard under App Review, set the app to Public. Ensure that the Facebook Page associated with this bot is published. Status appears in Pages settings.
Set the API version
If you receive a notification from Facebook about deprecation of a certain version of the Graph API:
Go to the app your created for your bot.
Under Settings, select Advanced.
Select Upgrade API version, then switch Upgrade All Calls to the latest version.
Test your bot in Facebook
You can now test whether your bot is connected to Facebook correctly by sending a message via the Facebook Page you associated with your new Facebook app.
Go to your Facebook Page.
Select Add a button.
On the Edit action button page, select Send message.
On the Frequently asked questions page, review the default question and answer, then select Save.
The site replaces the previous Edit action button with a new Edit Send message button.
Select Edit Send message then select Test button.
The site displays your Page with the sample question as a suggested action.
Enter any message you want to test the connection to your bot.