facebookfacebook-graph-apiwebhooks

How can i test Facebook webhooks in a development environment?


In my app we have webhooks setup so Facebook notifies us of changes in an ad account.

It looks like you can only set 1 URL for webhooks so i cant remove the production endpoint because that would mess up the production environment.

Is there any way i can send webhooks to another URL?

The only option i can think of is just hardcoding some fake payloads and testing my code that way.

Does anyone know if there is a way to set some type of development endpoint?

EDIT:

For anyone that comes back to this, a test app can never be "live" this means that calls that require an app that is not in development will not work. Maybe the best workaround is to create a duplicate app and get it approved.

enter image description here


Solution

  • Facebook has introduced a feature called Test Apps a while ago.

    https://developers.facebook.com/docs/apps/test-apps

    You can create a test version of your production app, that will get its own app id, and have its own app dashboard where you can change most of the settings - including webhook endpoints.