4

I'm developing an app which must interact with Facebook API Graph and also use webhooks to get live updates. Now I'm facing a problem I can't receive a live webhook updates until my app is reviewed and is not in development mode.

I've found a thread on a Fecebook for developers site describing the same problem and it got official answer - it is not possible. Use Test button in app dashboard to test your webhook implementation they said.

The problem is the Test button sends only one predefined data packet for each of possible subscription with predefined set of fields with fake values, but documentation defines much more fields and little to none information about which fields are sent in different situations (i.e. post added, comment deleted, comment edited).

I'm wondering how other devs solving this? May be there are some community driven reference for a different webhook interaction cases or else.

Olegas
  • 10,349
  • 8
  • 51
  • 72

2 Answers2

1

For now I can't find any information on detailed webhook format except official documentation on available fields (but not supported payload shapes). Our current workflow looks this way:

  1. create test app
  2. implement webhook handler using only documentation
  3. prepare test payload and check it is working
  4. create a screencast of the app functionality using test payloads
  5. go through the review process
  6. when app is approved
  7. make it live and check your implementation against real webhook payloads
Olegas
  • 10,349
  • 8
  • 51
  • 72
0

You need to create a test app for your existing Facebook app

Once you do this, just accept the permissions for your app and set the webhooks on your own Facebook account.

Since you are an admin of the test app, you will be able to set webhooks on yourself without having to get your app approved.

ricks
  • 3,154
  • 31
  • 51
  • No, this is not working now. It was working some time ago, but for now this is not correct. – Olegas Mar 06 '19 at 13:10
  • @Olegas You are right, if your app is not live you can only send test webhooks. Looks like your only option is creating fake payloads for each scenario. I am currently facing the same issue because theres no way to test webhooks in development. – ricks Mar 06 '19 at 14:31
  • For now my workflow looks this way:1 - create test app, 2 - implement webhook handler using only documentation, 3 - prepare test payload and check it is working, 4 - create a screencast of the app functionality using test payloads, 5 - go through the review process, 6 - when app is approved, 7 - make it live and check your implementation agains real webhook payloads – Olegas Mar 07 '19 at 07:37
  • @Olegas That is what i did, but once the app is live in production there no testing you can do with real payloads, unless you test in production, which nobody does... I don't understand their design decisions sometimes.. – ricks Mar 07 '19 at 20:05
  • Yes, after app going live you must test in production ) – Olegas Mar 11 '19 at 20:14