How to unsubscribe from the app from the facebook webhook ad page?

I have the following function (taken from a tutorial for facebook webcam) for subscribing to a page on a page, but I want the opposite to happen (unsubscribe).

How can i do this? I haven't found any answers in JavaScript yet.

function subscribeApp(page_id, page_access_token) { console.log('Subscribing page to app! ' + page_id); FB.api( '/' + page_id + '/subscribed_apps', 'post', {access_token: page_access_token}, function(response) { console.log('Successfully subscribed page', response); // insert in DB }); } 
+3
source share
1 answer

Here ya go.

  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); } ); } 
+5
source

All Articles