Meta Integration Process
To integrate Meta (Facebook Messenger, Instagram, and WhatsApp) with your GPT-trainer, follow these steps:
1. Create a Meta App
First, you need to create a Meta App of the “Business” type to access the necessary messaging APIs. Refer to Meta’s guide for detailed instructions on how to do this.
2. Obtain App Secrets
Once your Meta App is created, navigate to the “App settings” section in your Meta App Dashboard. Here, you will find your App ID and App Secret. Copy these values and paste them into the “Integrations” tab of your GPT-trainer Partners Dashboard.
You also need to generate a Verification Token. This can be any secure alphanumeric string (at least 32 characters is recommended). You can use a password generator for this. Enter this token in the designated field within the GPT-trainer Partners Dashboard and save it for your records.
3. Add Products to Your App
In your Meta App Dashboard, go to the main Dashboard page and add the following products to your app:
- Facebook Login for Business
- Messenger
- WhatsApp for Business
4. Configure Webhooks
Navigate to the Webhooks section of your Meta App. You will need to configure webhook subscriptions for Pages, Instagram, and WhatsApp Business. Ensure you are using API version 20.0 for all webhooks.
For each of the following subscriptions:
- Click Edit Configuration.
- Callback URL: Enter the following URL, replacing
<your-domain>
with your actual domain: - Verification Token: Use the verification token you previously saved in the GPT-trainer Partners Dashboard.
- Callback URL: Enter the following URL, replacing
- Test the messages webhook. You should see the message:
“The sample update was successfully sent to your server.” Then click Subscribe on Messages.
- If you experience duplicated messages after testing, unsubscribe from Messages and try the test and subscription again.
5. Configure Facebook Login for Business
Go to Facebook Login for Business → Configurations in your Meta App Dashboard and create three separate configurations:
-
Messenger
- Login Variation: General
- Access Token: User Access Token
- Authorizations:
-
Instagram
- Login Variation: General
- Access Token: User Access Token
- Authorizations:
-
WhatsApp
- Login Variation: whatsapp_embedded_signup
- Resources: WhatsApp account
- Authorizations:
For each integration you wish to add (Facebook Messenger, Instagram, or WhatsApp), copy the Configuration ID found under the respective configuration in the “Facebook Login for Business” tab and paste it into your GPT-trainer Partners Dashboard.
6. Request Advanced Access
You will need to request Advanced Access for the following permissions by filling out the necessary form in your Meta App Dashboard:
pages_messaging
pages_manage_metadata
public_profile
pages_show_list
whatsapp_business_messaging
instagram_basic
instagram_manage_messages
business_management
pages_read_engagement
whatsapp_business_management
Important Notes for Approval:
- To increase the likelihood of Meta’s approval, include clear videos with on-screen text instructions demonstrating your integration setup.
- For
whatsapp_business_management
approval, your video must explicitly show the creation of an ice-breaker under: https://developers.facebook.com/docs/whatsapp/cloud-api/phone-numbers/conversational-components#ice-breakers
7. Integrating with Existing Stripe Plans (Optional)
If you want to add Meta integrations to existing Stripe plans, ensure the metadata key meta_integration
is set to True
for those plans.
Credit to Federico De Cillia