问题
I have this code and It's from this link https://developers.facebook.com/docs/reference/api/page/ (Please see 'Hiding a Page Post')
I don't have any error but my problem is, this code is not working. the page post is still not hidind
Below is my code:
$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();
I look forward for answers. thanks!
回答1:
You can hide the post after you have posted it:
$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"));
来源:https://stackoverflow.com/questions/17704409/how-to-hide-page-post-using-facebook-api