Cloud Elements currently supports events via polling or webhooks depending on the endpoint.
n
minutes and captures the changed information.If you would like to see more information on our Events framework, please see the Event Management Guide.
The Facebook Lead Ads element supports webhooks for Lead Generation events. For Facebook Lead Ads events to work with Cloud Elements, use the Webhook URL
created after provisioning to set up the Webhook product in Facebook. See the Facebook webhook documentation for more information about how Facebook uses webhooks.
You need the Webhook URL
which is dynamically created when you provision an element. To locate the Webhook URL
, navigate to the Element Instance in the user interface.
To set up webhooks for Facebook Lead Ads:
Webhook URL
from the Element Instance. See Get the Webhook URL.In Subscription Fields, select leadgen.
The New Page Subscription Window should look like this:
Click Verify and Save.
To enable events, add these extra configurations to your instance JSON. Only event.notification.enabled
is required.
"event.notification.enabled": "true",
"event.notification.callback.url": "<INSERT_YOUR_APPS_CALLBACK_URL>",
"event.notification.signature.key":"<INSERT_YOUR_APP_ID>"
instance JSON with polling events enabled:
{
"element": {
"key": "facebookleadads"
},
"providerData": {
"code": "Code on Return the URL"
},
"configuration": {
"oauth.api.key": "<INSERT_FACEBOOK_CLIENT_ID>",
"oauth.api.secret": "<INSERT_FACEBOOK_CLIENT_SECRET>",
"oauth.callback.url": "https://www.mycoolapp.com/auth",
"oauth.scope": "<INSERT_FACEBOOK_LEVEL_OF_PERMISSION>" ,
"event.notification.enabled": "true",
"event.notification.callback.url": "<INSERT_YOUR_APPS_CALLBACK_URL>",
"event.notification.signature.key":"<INSERT_YOUR_APP_ID>"
},
"tags": [
"<INSERT_TAGS>"
],
"name": "<INSERT_INSTANCE_NAME>"
}
Note: For webhooks, enter at least "manage_pages" for oauth.scope
.