CopyPastor

Detecting plagiarism made easy.

Score: 1; Reported for: Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2020-10-23
by Jack

Original Post

Original - Posted on 2019-09-19
by Nick



            
Present in both answers; Present only in the new answer; Present only in the old answer;

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.
I think I found your problem! It is when you subscribe to your apps. Here is the link that shows the subscribed_fields and scope should be:
https://stackoverflow.com/a/54713182/7313872
I was going straight from the demo and the subscribed_fields is set to 'feeds' and the scope was only manage_pages. You need to change it like in the example in the above link. I will also provide the snippets I changed below:
subscribed_fields - in subscribe apps function
FB.api( '/' + page_id + '/subscribed_apps', 'post', {access_token: page_access_token, subscribed_fields: 'leadgen'}, function(response) { console.log('Successfully subscribed page', response); } );
scope - end of facebook login function
{scope: ['manage_pages', 'leads_retrieval']}); Hope this helps!

        
Present in both answers; Present only in the new answer; Present only in the old answer;