At A Glance
Facebook Messenger bots launched in 2016 and has quickly emerged as a popular, fully-featured chatbot platform. Dexter bots for Facebook are built on top of the robust Messenger Platform part of the overall Facebook Developer and Pages ecosystem.
If all this looks scary and intimidating, or maybe you've even tried deploying a bot to Facebook before, don't worry! All of Dexter's platform configuration walkthroughs give you a step-by-step tutorial through in the configuration process so you don't have to worry about anything to do with coding or servers. Please also note all Messenger bots built on Dexter must comply with Facebook's messaging policies.
After you've followed our step-by-step platform configuration walkthrough on the Platforms tab of your bot's editor, read below for some pointers that ever Facebook Messenger bot creator should know:
Messaging Your Bot
There are several ways to reach your bot: from the your page on Facebook.com, searching for the page on the Facebook Messenger app, and by using the Messenger short url: https://m.me/PAGE_USERNAME.
Messenger Bot Testers
Only certain people can interact with your Messenger bot prior to Facebook approving the bot and making it discoverable and usable by the general public. Add new test users by following the steps below:
- Find the Facebook app associated with your bot
- In your app's configuration page, go to Roles
- Add people to the Testers list (Developers or Administrators will also work—be sure to understand the elevated permissions you are giving them. They have to accept the invite to join the app, while Testers will be added automatically.)
Approval of Bots
When you are ready for your bot to be accessible to the whole world, you need to go through Facebook's App Review process.
Go to your Facebook app's configuration page.
On the left sidebar, find Messenger and select Settings under it.
Scroll down to the App Review for Messenger section.
You need to fill out the associated notes before submitting your application, including providing a few sample user messages and expected bot responses.
Submit and wait for approval. You can view your status on this App Review section of your app. Typically, this process will take 1-2 business days.
After you receive approval, you must make your Facebook app live and available to the public. Toggle the switch to "Yes" in the
If you would like to send Broadcasts to your users, you must apply for additional permissions for your Facebook Page. All broadcasts you send via Facebook must also conform to their policies around messaging.
Follow these steps to get started with your submission:
Go to the Facebook Page that you want to submit for broadcasting. It should already be deployed on Dexter.
Find your page's Settings in the top right of Facebook's menu bar. Under Settings, navigate to Messenger Platform on the left.
Scroll down and find Advanced Messaging Features. Click Request to begin your submission.
- Follow the instructions and submit sample broadcasts your bot will send.
Add a “Send Message” button to your Page
To call attention to the existence of your bot from your Facebook Page, we recommend setting “Send Message” as your page’s primary CTA.
_userFullName data fields are automatically populated for use in Facebook bot responses. Learn more about available pre-populated namespace variables from Facebook.
Entry Points for Messenger Bots
There are few ways to reach your Messenger Bot, the most common of which are:
- Visit the Facebook Page associated with this bot and click the "Send Message" button. If you do not have one, read the section above.
- Visit the bot at the
m.me/PAGE_IDurl associated with the deployed page. If you have assigned a unique username to this page, the
PAGE_IDvalue may be replaced with the
USERNAMEvalue in the url, like
- Search for the bot in Messenger. The bot will only be visible if made public after the App Review process is complete.
- Place an ad for your bot, which will direct users on Facebook, Instagram, or Messenger to a deep-linked conversation with your Messenger bot.
- Generate a Messenger-specific QR code for your bot, which will allow users to scan and access the bot through the Messenger app.
The aforementioned entry points allow bot developers pass in additional parameters that we capture in namespace variables for use in your bot script. Learn more about referral parameters here.
I am having difficulties deploying my bot on Facebook.
- Within your app’s Settings page, make sure you have included the domain
https://rundexter.comto the App Domains field and that you have added
https://rundexter.comas a Website under + Add Platforms. Save changes before exiting the page!
- Make sure you have added the correct
Page IDand correct
App IDto the appropriate text fields in the Facebook settings panel. Page ID can be found on the About tab in the sidebar of your Facebook Page. Scroll down to the Page ID field.
- Have you added the right
App Secrettokens from your Facebook app page in the developers.facebook.com console of your app?
I can't deploy to my personal page.
Facebook won't let you deploy bots a personal page. To deploy a bot to a page, create a new business page on Facebook here.
I can’t find my bot in Messenger Search.
Bots are not discoverable to the general public until the app is approved. While in Development Mode, only Developers, Moderators, Administrators, or Testers can find the bot through search.
If your bot hasn't been messaged in a while, Facebook may unpublish your bot making it unavailable to the public. Visit your Facebook Page settings to re-publish any inactive Facebook pages.
I can't find my bot on my Facebook page.
The easiest way to find the bot for your Facebook page is to add a "Send Message" button as your primary call-to-action button.
My bot doesn't respond to a user.
- If you haven't submitted your app for approval yet, make sure that the user that's trying to use your bot has been added as a tester (See above.)
- If your app has been approved, make sure to toggle your bot to public in the App Review page of your Facebook app.
- If your bot hasn't been messaged in a while, Facebook may unpublish your bot making it unresponsive to public messages. Visit your Facebook page settings to republish any inactive Facebook pages.
I am seeing a "An active access token must be used to query information about the current user" error while trying to deploy my bot on Dexter.
If you successfully authenticated a Facebook user to your app in a previous step, but that user is not the creator, admin, or have any other role in your app, you may see this error while deploying. Add this user to a role for your app and try to deploy again.
I am seeing a "Attachment size exceeds allowable limit" error. Facebook is not rendering my image or video files.
There does not seem to be an official limit on image size. Keeping them under 10MB is advisable to keep the bot speedy. The max message attachment size is 25MB. In short, you shouldtry out your media files with your deployed Facebook bot to make sure they render well.
I am seeing a "Cannot message users who are not admins, developers or testers of the app until pages_messaging permission is reviewed and the app is live." error.
In order to authenticate and deploy a Messenger bot on Dexter, make sure you are either Admin or Editor on the Facebook page associated with the Page Id.
I am seeing a "Error validating access token: The session has been invalidated because the user changed their password or Facebook has changed the session for security reasons." error.
Have you recently changed your Facebook password? You will need to reauthenticate your Facebook bot. Click
Undeploy and then
Re-Authenticate on your Platforms > Facebook page.
I am seeing a "Length of param message[text] must be less than or equal to 640" error.
Facebook requires text messages to be UTF-8 and be shorter to 640 characters.
I am seeing a "Message cannot be empty, must provide valid attachment or text" error.
Facebook requires each response to include text. Make sure that your response includes text. This can be tricky if the given response has a combination of directions, topic redirects, or trigger redirects. Remember that <set> directions and topic redirects do not return text. Also, be careful about your use of multiple
<delay> directions concurrently.
I am seeing "OAuthException: Code 2500" errors.
If you see an error message with
"code":2500 when trying to deploy, double check that the Facebook Page that you're trying to use with Dexter is under your control. This error is sometimes surfaced when you aren't an admin of the Page.
I am seeing "To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook." errors.
To deploy a Dexter bot on Messenger, the Facebook app must first be private. On your Facebook app console, make sure that the app's has a "Status: In Development" when deploying. After deploying on Facebook, you can then toggle the app back to "Status: Live".
I want a Facebook Page username so that I can access my bot at
m.me/PAGE_USERNAME instead of at
To be eligible to create a unique username for your Facebook Page, your page needs 25 page likes.
How long does Facebook approval take? How can I make sure my bot passes Facebook approval?
In general, we find that the Facebook approval process takes less time than they claim (which is sometimes 5–10 days). Usually it turns around in a handful of business days, but it does vary. One tactic to make sure it goes smoothly is ensuring your answers to their questions about what the bot responds with is as precise as possible.