我有这个代码,而且来自这个链接https://developers.facebook.com/docs/reference/api/page/(请参阅'隐藏页面帖子')
我没有任何错误,但我的问题是,此代码无效。页面帖子仍然不是隐藏的
$fanpage_credit = array(
'access_token' => $page_token,
'is_hidden' => true
);
$fanpage_post_url = '/'.$post_id;
$postResult = $facebook->api($fanpage_post_url, 'post', $fanpage_credit );
echo 'HIDE SUCCESS '.time();
我期待着找到答案。谢谢!
答案 0 :(得分:4)
您可以在发布后隐藏帖子:
$fanpage_credit = array(
'access_token' => $page_token,
'is_hidden' => true
);
$fanpage_post_url = '/'.$post_id;
$postResult = $facebook->api($fanpage_post_url, 'post', $fanpage_credit );
if (isset($postResult["id"]))
$facebook->api("/$postResult[id]", 'post', array("timeline_visibility"=>"hidden"));