facebookfacebook-graph-apiwebhooksfacebook-marketing-apifacebook-webhooks

Webhook for lead retrival: can use multiple callbacks for single app?


I have an app with leads_retrieval permission approved and I'm currently using bulk read to download leads from Facebook. To avoid new rate limits, coming with v4.0, I'd like to switch to Webhooks mode, but we have one Facebook app configured in many accounts of our products and we need callbacks to be different from one customer to another. From what I see in my dev dashboard, it's only possibile to configure one callback...but in the documentation, the subscription endpoint include a callback_url parameter:

POST /v4.0/{app-id}/subscriptions HTTP/1.1
Host: graph.facebook.com

object=page&callback_url=http%3A%2F%2Fexample.com%2Fcallback%2F&fields=about%2C+picture&include_values=true&verify_token=thisisaverifystring 

Shouldn't be the callback implicit in the access_token? So, I'm wondering if this callback_url parameter use to subscribe the single page, could be different from the global one, configured in the developer dashboard...

Thanks for any suggestion.


Solution

  • No, that is not possible.

    You can provide different URLs for different subscription types, but you can not specify different ones based on which account the data change occurs for.

    If you need an individual callback URL for the same type of webhook for each customer - then you would need an individual app per customer to begin with.