0

My Facebook App keep receiving webhooks from token expired pages. How can I unsubscribe them to avoid unnecessary incoming traffics?

  • Found the answer https://stackoverflow.com/questions/47865756/how-to-unsubscribe-an-app-for-all-facebook-pages-webhooks?newreg=d9da4f3b32c84216bc9f808605b031ae – Frost Chen Sep 06 '18 at 04:47
  • 1
    Possible duplicate of [How to Unsubscribe an app for all Facebook pages Webhooks](https://stackoverflow.com/questions/47865756/how-to-unsubscribe-an-app-for-all-facebook-pages-webhooks) – Roy Scheffers Sep 06 '18 at 05:20

1 Answers1

0

You could use the following call to unsubscribe app from page: `

curl -X DELETE -F "access_token=<PAGE_ACCESS_TOKEN>" "https://graph.facebook.com/v5.0/<APP_ID>/subscribed_apps"

Or through a function call:

  function unSubscribeApp(page_id, page_access_token) {
    console.log('Unsubscribing app from page! ' + page_id);
    FB.api(
      '/' + page_id + '/subscribed_apps',
      'delete',
      {access_token: page_access_token},
      function(response) {
        console.log('Successfully unsubscribed page', response);
      }
    );
  }

`