正在开发一个 facebook 应用程序以将图像发布到页面,我想使用 javascript api 删除特定的 facebook 帖子,有什么帮助吗?
这是我的代码:
FB.api('/1234/photos', 'post', {
access_token : FB.getAuthResponse()['accessToken'],
message: "message",
url : '',
from : 1234,
}, function (response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post ID: ' + response.id);
}
});
删除帖子功能:
function delete_post(post_id)
{
FB.api(post_id, 'delete',function(response) {
console.log(response)
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post was deleted');
}
});
}
这对我不起作用,总是收到错误消息。我应该选择哪个 ID 来删除帖子?response.id 还是 response.post_id?
谢谢