2

What I have: Facebook business account, that has a Page, that has some Ad forms, that generate leads.

What I need: I need to store leads contact data in my company's database.

What I did:

First of all, I followed this doc. It describes how to set up an App that is then subscribed to my Page to receive webhook update when lead is created. Wonderful. Now, all I get from webhook is some lead metadata (lead id, page id, form id, etc) but not the lead field values themselves. I looked up this doc and it describes how to get lead field values by lead id. I tested it with this tool and it works great. Then I tried to retrieve some live lead data and this is where problems started. Whenever I try to get info about live lead, I get the following response:

{
  "error": {
    "message": "Unsupported get request. Object with ID '193020162572339' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api",
    "type": "GraphMethodException",
    "code": 100,
    "error_subcode": 33,
    "fbtrace_id": "ADavE3byEBvsDiDAUdm-JyP"
  }
}

Now, it seems like there might be some permissions problem. The worst part is that Facebook docs are rather conflicting on topic of what I need to fix this. Some docs pages say I need my app to be in Live mode. The others say Live/Test mode distinction is deprecated and now I need to request permissions instead. But on permission request page it says that if I need to retrieve data within same Business I only need Standard level permissions and those are granted by default (makes sense, and looks like it was literally meant for use-case like mine, yet it doesn't work). Also this page states I need to undergo an App Review and Business Verification (which both seem like pretty time-consuming ordeals, not to mention it makes no sense whatsoever, like for App Review I need to add some platform to my app, while all I need is just fetch some leads data. I'd think Facebook just wants to make sure all user data submitted to lead forms is super safe, but there's a problem: I already can see and download all the leads data from facebook Leads center interface or via https://www.facebook.com/ads/lead_gen/export_csv/?id=<FORM_ID> endpoint, and I don't even need Business Verification for that. That, together with the fact it makes no sense at all, makes me believe something else is the reason of this problem and I'll just waste time undergoing App Review and Business Verification.

That being said, what could be possible reason I can retreive test leads data but can't retrieve live leads data (although I do get webhook notifications about those live leads)?

Kumagoro
  • 31
  • 5
  • Did you find the solution? I am facing a very similar problem. – iloo Jul 02 '21 at 11:13
  • 1
    Yeah. "But on permission request page it says that if I need to retrieve data within same Business I only need Standard level permissions" - turned out this was a lie and I had to a) complete business verification and b) request advanced access for pages_show_list, public_profile, pages_read_engagement, pages_manage_metadata, pages_manage_ads, leads_retrieval and email – Kumagoro Jul 05 '21 at 14:58

1 Answers1

0

Whatever the steps you have followed are right. To retrieve leads you app needs to be live and should have 'ads_managment', 'leads_retrieval' and 'pages_manage_ads'. I have referred this link to implement the same thing for Facebbok Marketplace ads.