如何从Facebook Webhook潜在客户广告页面退订应用程序? [英] How to unsubscribe an app from a page for facebook webhook lead ad?
本文介绍了如何从Facebook Webhook潜在客户广告页面退订应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我具有以下功能(取自facebook webhook教程),用于将应用程序订阅到页面,但是我希望相反的事情发生(取消订阅).
I have the following function (taken from the facebook webhook tutorial) for subscribing an app to a page, but I want the reverse thing to happen ( unsubscribe).
我该怎么做?我还没有在JavaScript中找到任何答案.
How can I do that? I have not found any answers yet, in JavaScript.
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
});
}
推荐答案
可以了.
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);
}
);
}
这篇关于如何从Facebook Webhook潜在客户广告页面退订应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文