The process of completely linking your application to your Facebook consists of two parts:
- Linking your Facebook page to your Vonage account
- Linking your Facebook page to a specific Vonage application
There may be occasions where you want to link your Vonage account to a Facebook page, but have not yet created a Vonage application. This is fine, as long as after you create your Vonage application, you then link that application to your Facebook page. This step shows both parts of the complete process.
Linking your Facebook page to your Vonage account allows Vonage to handle inbound messages and enables you to send messages from the Vonage Messages API.
To link your Facebook page to your Vonage account click Link your Facebook Page to Vonage.
Select the Facebook Page you want to connect to your Vonage account from the drop down list.
Enter the API key and API secret for your Vonage account.
Click Subscribe. You will receive a message confirm successful subscription.
At this point your Vonage account and this Facebook Page are linked. The link between your Vonage account and Facebook page expires after 90 days. After then you must re-link it.
Once your Facebook page is linked to your Vonage account, it becomes available for use by any of your applications. To link the Facebook page to a Vonage application:
Navigate to your applications page.
From the list, click on the application you want to link. You can filter by using the Capabilities drop down and selecting
messagesto make this easier.
Then, select the Linked external accounts tab.
Click the Link button beside the Facebook Page you want to link your application to, ensuring that the Provider is Facebook Messenger.
You're now ready to receive messages users send to you on your Facebook Page.
NOTE: If in the future you want to link a different application to this Facebook page, you only need to repeat the procedure described in Part 2, for the new application.
The link between your Vonage account and Facebook page expires after 90 days. You can re-link it by performing the following steps:
Visit the following page and select the page you want to re-link from the drop down list
When the page is successfully unsubscribed, re-link it by clicking Subscribe.
Sending a Facebook Messenger messageThe Messages API provides the ability to send messages to various channels, including Facebook Messenger, SMS, WhatsApp and Viber. This task looks at using the Messages API to send a Facebook Messenger message.