Retrieving leads from Facebook
Consider the scenario where Contoso Water Purifiers want to advertise their products and generate leads on Facebook. They decide to use an advertising agency to setup and manage their campaigns on Facebook. The advertising agency creates a Facebook page called ‘Contoso Water Purifiers’. They then create a leads ad to run a lead generation campaign for Contoso’s ‘extra pure’ water purifiers (via Facebook Business Manager). Contoso wants to be able to retrieve these leads via Facebook’s API.
John is an employee of Contoso in their IT department and has an individual Contoso Facebook account. He has been made an admin of the ‘Contoso Water Purifiers’ Facebook page. John has also created a Facebook App ‘App to retrieve leads’ which is required when using the Facebook API.
When John, using his Facebook account, views the Facebook page ‘Contoso Water Purifiers’, he can see all the Leads in the Page’s ‘Leads Centre’.
However, when he tries to retrieve the leads using the Facebook API, no leads (apart from a test lead which John created) are returned (even though the API test tool states that there were say 71 leads). This is because Facebook seems to consider the leads data generated by the advertising agency as owned by the agency.
(On a side note, to view the questions which have been defined on the form, the following call can be made.)
(Tools such as Postman can be used to connect to the Facebook API but it’s necessary to log into Facebook first.)
Request ‘Advanced Access’ through App Review
The business app ‘App to retrieve leads’ was created with ‘Standard Access’ for the permissions:
- leads_retrieval, pages_manage_ads, pages_read_engagment, pages_show_list
Since the app needs to access leads data owned by the agency, ‘Advanced Access’ needs to be requested for these permissions.
Request ‘Business Verification’
In order for Advanced Access to be approved, the app needed to be managed by a verified Facebook business account. So, to achieve this, a ‘Contoso’ Facebook Business Manager account needs to be created. Once created, this will automatically own the app ‘App to retrieve Leads’. This app will then need to be business verified by Facebook. Once verified, the app will be able to retrieve leads.