2014-03-12 78 views
0

我正在構建一個腳本,該腳本會根據頁面粉絲數量的變化上傳封面圖片。隱藏時間軸上傳的照片

當照片上傳時,它會出現在時間線上。

有沒有什麼辦法可以將它從時間軸中刪除。

$photo = FCPATH . "assets/img/image(" . rand(1, 3) . ").jpg"; 

    $this->facebook->setFileUploadSupport(true); 

    $photo_uploaded = $this->facebook->api("/" . $page_id . "/photos", "POST", array 
     ('access_token' => $this->input->get('access_token'), 'source' => '@' . $photo)); 

    $this->facebook->api("/" . $page_id, "POST", array(
     'access_token' => $this->input->get('access_token'), 
     'cover' => $photo_uploaded['id'], 
     'offset_y' => 0)); 

    $this->facebook->api("/" . $photo_uploaded['id'], "DELETE", array('access_token' => 
      $this->input->get('access_token'))); 

    $this->manager->setFansCount($page_id, $data['likes']); 

回答

1

no_feed_story參數,設置添加到true到封面圖像API調用來抑制故事,並添加no_story並設置爲true打壓照片上傳故事(而不是刪除)。

E.g.

$this->facebook->api("/" . $page_id, "POST", array(
    'access_token' => $this->input->get('access_token'), 
    'cover' => $photo_uploaded['id'], 
    'offset_y' => 0 
    'no_feed_story' => true)); 
+0

非常感謝。會嘗試一下並回復給你:D –