我正在构建一个脚本,根据页面粉丝数量的变化上传封面图片。
上传照片时,它会显示在时间线上。
有什么方法可以将它从时间轴上删除。
$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']);
答案 0 :(得分: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 ));