这份文档还在翻译中,预期年底前完成。欢迎您提供宝贵的意见及建议。

Understanding Facebook messaging

Only individuals may create a Facebook Profile. However, an individual can use their Profile to create a Facebook Page for a business.

A Facebook user must initiate communication using Facebook Messenger via the business's Facebook Page. A message from the business to the Facebook user will be refused if a user has not initiated contact with the business's Facebook Page within 24 hours.

Facebook Messenger uses its own form of IDs for the Facebook User and the Facebook Page :

  • Facebook User (profile) - Page-Scoped ID (PSID)
  • Facebook Page (business) - Page ID

The Facebook User will have a Page-scoped ID (PSID) and this is unique for each Facebook Profile. The business can only obtain the PSID of a user when the user sends a message to the business. In Facebook Messenger, the default is for the customer to initiate a conversation with a business.

In order to get started with Facebook Messenger you will need to link your business's Facebook Page to Vonage.

Part 1: Connect your Facebook Page to your Vonage API account

Connecting your Facebook page to your Vonage API account allows Vonage to handle inbound messages and enables you to send messages from the Messages API.

  1. To link your Facebook page to your Vonage API account visit the Link Facebook Page in your dashboard.

  2. Log into your Facebook account from the dashboard.

  3. Select the Facebook Page you want to connect to your Vonage API account from the drop down list.

  4. Select the API key you'd like to use.

  5. Click Complete setup.

At this point your Vonage API Account and this Facebook Page are linked. The link between your Vonage API account and Facebook page expires after 90 days. After then you must re-link it using the same process.

Part 2: Connect your Facebook Page to your Vonage API application

Once your Facebook page is connected to your Vonage API account, it becomes available for use by any of your applications. To connect the Facebook page to a Vonage API application:

  1. Navigate to your applications page.

  2. From the list, click on the application you want to link. You can filter by using the Capabilities drop down and selecting messages to make this easier.

  3. Then, select the Linked social channels tab.

  4. Click the Link button beside the Facebook Page to which you want to connect your application, 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.