2

我有这个代码,它来自这个链接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(); 

我期待着答案。谢谢!

4

1 回答 1

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")); 
于 2013-09-02T09:30:10.640 回答