Facebook Webhook Subscriptions (Alerts)
Webhooks allow you to receive real-time notifications of changes to your Facebook page. For example, you can get notification whenever users post to your feed, comment on a post, like your posts, fill up lead form or send you messages.
Step 1: Verification Request
Inside the Facebook developer platform, navigate to: Use Cases > Customize Pages API > Webhooks
Then, select product as page. In the Callback URL, enter the following:
https://yourdomain.com/index.php?option=com_tftools&task=facebook.webhook&id=<channel_id>&format=raw
Replace your website domain name and channel id. In the verify token, enter the value as the Cron Token in the component options.
Click "Verify and save" button.
Step 2: Subscribe to Event Notifications
After verifying, you can subscribe to Alerts.
feed: Notifies you when an Page's feed has changed; posts, reactions, shares, and so on.
messages: Notifies you when your page has received a message via Messenger. For this, pages_messaging permission is required.
leadgen: Notifies you when lead form is submitted. For this, leads_retrieval permission is required.
Step 3: Setup Tasks
The final step is to setup Tasks ti implement automatic workflows. You can setup more than 1 tasks.
- From the component dashboard, navigate to Tasks.
- Create a new task of Trigger type as "Facebook Alerts".
- Select the Action of what you want to do. For example, send email notification or save into database.