Facebook Messenger Custom integration for personal use
In order to configure the sending of notifications via Messenger, the user must have a Facebook account verified with e-mail and phone number, a created Facebook application (bot) and a published Facebook page linked to it.
But for everything to work, you need to pre-configure the integration and enable subscription in the properties of the desired channel.
If at least one of these items has not been configured, you will see the following message at the stage of subscribing to the channel:
Step 1. Configure integration
- Go to the Integration screen. This can be done via the dropdown menu in the upper right corner of the screen. Make sure you are logged in to the system.
- Click on the Create button.
- Click on the Facebook Messenger Custom card.
- Set a custom name for the integration, if necessary, and enter the the Page Access Token. To get it, on the Meta for Developers portal (formerly Facebook for Developers), select the application you want and follow the path: Messenger> Settings> Access Tokens.
- Check the box next to Incoming messages processing (and allow subscribing through the Notify.Events interface).
- Personal Incoming Message URL will be generated automatically. It must be inserted into the Callback URL field in the Facebook page settings in the Meta for Developers interface: App> Messenger> Setting> Webhooks.
- Next, fill in the Page User Name field. If the page has a set username, you will find it in the page settings: Page> Settings> Page_info> Username. Or just copy the page ID from the URL.
- Enter any set of numbers and / or letters in the Verify Token field. The Verify Token fields in the Notify.Events and Facebook interfaces (App> Messenger> Setting> Webhooks) must match.
- After clicking the Save button, the created integration will appear on the Integration screen.
Step 2. Allow subscription
- Go to the channel properties via the Edit button on the main screen of the Control Panel or on the channel screen.
- Check the box next to Facebook Messenger Custom in the Allow subscription via integration field and click the Save button. Facebook Messenger Custom will be displayed in this field only after successfully completing Step 1.
In the next step, you can add custom integration to the channel.
Step 3. Add the custom integration to the channel
After you have configured the Facebook Messenger Custom integration and allowed the subscription, you can add it to the selected channel as a recipient.
- On the channel screen, click the Subscribe button in the Recipients section.
- On the Channel subscription screen, select Facebook Messenger Custom.
- Click the button to add the bot to your contact list.
- After that, a dialog with your bot will automatically open in a new window. Log in to Messenger through the Facebook account under which the bot and the page were created.
- Copy the subscribe command and send it to the dialog.
Ready! The subscription will now appear in the Recipients section of the channel screen, and you will receive notifications from the chosen services in Messenger.
Setting up a Facebook app and page
How to create a Facebook application (bot)?
- Log in or register to the Meta for Developers portal (formerly Facebook for Developers) using your Facebook account.
- On the Apps screen, click the Create App button.
- Select the application type None.
- Enter the name of your application in the Display name field and check your contact email in the corresponding field. You do not need to specify a Business Account. After that click on the Create App button.
- On the screen that opens, click the Set Up button in the Messenger card.
Congratulations! You have created your own Messenger bot. Now you need to create a page and link it to the bot to start using it.
How to create a Facebook page and link it to the bot?
- From the app dashboard, go to Messenger> Settings in the right side menu. Scroll down to the Access Tokens section and click the Create New Page button to create a new page.
- In the new window, enter the name of the page in the Page name field and select the appropriate category in the Category field. It is optional to fill in the Description field. Then click the Create Page button, and after receiving a message about successful creation - the Save button.
- On the Manage page screen that opens, select Settings from the left side menu.
- In the Page Info section, enter a username in the appropriate field. This step is optional.
- Return to the application window and click the Add or Remove Pages button in the Access Token section to link the page you just created.
- Select the created page from the list and click Next.
- Make sure that the slider in the Manage and access Page conversations in Messenger line is set to Yes, and click the Done button, and then OK in the new pop-up window that opens.
- Go back to the App Dashboard and in the Webhooks section click the Add Callback URL button. At this point, to get the Callback URL and Verify Token, you need to go to the Notify.Events interface.
- Go to the Facebook Messenger Custom Integration on the Integrations page.
- Enter the name of the created page in the Page User Name field. If you did not create it, use the page ID from its URL.
- Copy the auto-generated link from the Incoming Message Url field and paste it into the Callback URL field. In the Verify Token fields in the Notify.Events and Facebook interfaces, enter the same random set of numbers and / or letters. Then click the Verify and Save button.
- On the app screen, under Webhooks, click the Add Subscriptions button.
- In the pop-up window that opens, check the boxes next to the messages and messaging_postbacks lines and click the Save button.
- On the app screen, in the Access Tokens section, click the Generate Token button.
- In the pop-up window, check the box next to I Understand.
- Copy the received token and paste it into the field in the Facebook Messenger Custom integration settings in the Notify.Events interface. Click the Save button to complete the integration setup. On the Facebook interface, click the Done button.
Good job, you've created a page for your Messenger bot! You can now go back to the top of the instruction and set up the Facebook Messenger Custom integration to start receiving notifications through your Messenger bot.
- Getting started
- Using Notify.Events
- Your account
- Advanced options