Facebook page leadgen webhook returns error 102 Server Failure
Asked Answered
S

7

12

Facebook page leadgen webhook won't work for my page and associated app.

If I test the webhook I setup with the testing tool and click the "Track status" button, the issued realtime update object is associated to this error: 102 Server failure

My facebook setup consist of:

Page, ad accoung and app all belong to the business, and the app seems to be correctly subscribed to the page : it is listed in the results of a graph api call to /<page-id>/subscribed-apps.

Does anyone have an idea of what I could be missing ?

Many thanks.

Sp answered 16/11, 2017 at 19:24 Comment(1)
Hello AlexHv. I 'm having exactly the same problem and none of the answers has help me. Did you manage to solve this issue? Any help or recommendation you could share will be very appreciated.Joey
S
0

Ok I found the problem.

Although my app was correctly subscribed to the page with all valid and never expiring tokens, one authorization was missing.

If you encounter the same problem follow those steps :

-> go to business manager
-> go to busienss settings
-> go to leads access tab
-> select your page
-> click "CRMs"
-> Select your app and assign access

Hurray

Sp answered 20/11, 2017 at 13:15 Comment(1)
Does this work for the development app or only for live app?Radiolucent
C
11

One recent change (as of May 1, 2018) is that the app Status must be "Live" in order to receive actual webhook updates. If it is left "In Development", webhook requests will now fail with error code 102 "Server failure" (such a helpful message!), and the Webhooks page for the app (https://developers.facebook.com/apps/{your app ID}/webhooks/) will show a message saying:

Applications will only be able to receive test webhooks sent from the app dashboard while they are in development. No production data, including that of app admins, developers, and testers, will be delivered unless the app is live.

It took me a while to figure that out since the webhooks had been working previously. Hope this helps some people!

Censor answered 2/5, 2018 at 18:51 Comment(2)
My app is "in development" status but it still get's error code 102.Tentage
@user1419440 Right. It must be set to "Live" in order to process a webhook request. Unless you mean that you used the app dashboard to send a test webhook, and that gave you an error code 102? If that's the case, then you have a different problem. (Perhaps a missing authorization, as mentioned in AlexHv's answer?)Censor
R
5

I know this is really old but I came across the same issue and this is what I found.

"You can use this tool to create and delete test leads for your forms; however, you cannot use the tool in developer mode."

Basically saying you will get that 102 message if you're in dev mode, which makes no sense why they would have a testing tool you can only use when your app is "live".

Rendering answered 7/8, 2019 at 15:13 Comment(0)
S
0

Ok I found the problem.

Although my app was correctly subscribed to the page with all valid and never expiring tokens, one authorization was missing.

If you encounter the same problem follow those steps :

-> go to business manager
-> go to busienss settings
-> go to leads access tab
-> select your page
-> click "CRMs"
-> Select your app and assign access

Hurray

Sp answered 20/11, 2017 at 13:15 Comment(1)
Does this work for the development app or only for live app?Radiolucent
M
0

While subscribing my page to Facebook app I've set leadgen_fat instead of leadgen and got this error.

Add retrieve_leads to your scope on login and be sure that your app has this permission.Then add leadgen to subscribed fields.

https://mcmap.net/q/805158/-how-to-solve-quot-the-parameter-subscribed_fields-is-required-quot-error-while-subscribing-a-facebook-page-to-app

Mention answered 18/6, 2019 at 15:31 Comment(1)
That should be leads_retrieval (not retrieve_leads).Makkah
C
0

I solved the issue, this was the problem here the RTU debug tool was not working until I made my app to LIVE status then it was working properly . Also on the FB docs its clearly showing

Choral answered 25/4, 2020 at 11:37 Comment(1)
Does this live app has to have manage_pages, leads_retrieval & ads_management pages? Also how did you get page access token for live app?Quatre
M
0

When you previously used the Facebook documentation for the webhooks startup, the platform.php file code would subscribe you to "feed" and not "leadgen" so check that you have the correct subscription code. I logged the bug in their documentation and looks like they have fixed it.

https://developers.facebook.com/support/bugs/681262475926363/

https://developers.facebook.com/docs/marketing-api/guides/lead-ads/quickstart/webhooks-integration/

FB.api(
  '/' + page_id + '/subscribed_apps',
  'post',
  {access_token: page_access_token, subscribed_fields: 'leadgen'},
  function(response) {
    console.log('Successfully subscribed page', response);
  }
);

Also check that

  1. Your app is live and through review
  2. You have all the permissions.
  3. You are subscribed to the correct type aka "leadgen"
  4. Your CRM has been given access to leads and manage pages by the Business Manager Account, owner or client.
Mortification answered 23/10, 2020 at 6:54 Comment(0)
O
0

I resolve the problem whit next CURL.

Register app to page:

curl -i -X POST "https://graph.facebook.com/{pague_id}/subscribed_apps?subscribed_fields=leadgen&access_token={token_id}"

leadgen field is very important

The response on my server is good!

{"id":"XXXXXXX","time":1606958566,"data":{"value":{"form_id":"7415707530XXXX","leadgen_id":"891990681XXXXX","created_time":1606958565,"page_id":"375141142501174"},"field":"leadgen"}
Outfoot answered 3/12, 2020 at 2:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.