2016-02-05 38 views
4

我想在Facebook頁面上安排一張照片作爲頁面。當我嘗試只安排消息,然後它的作品,但當我給圖像的源,然後它給出了錯誤圖返回了一個錯誤:發生意外的錯誤。請稍後重試您的請求。在Facebook頁面上的日程安排圖片發佈

$image = url().'/images/logo.png'; 

$data = [ 
'message' => 'new schedule 1', 

'source' => $image, 

'published' => 0, 

'scheduled_publish_time' => $epochTime 

]; 


$response = $fb->post('/949206005163395/feed', $data, $pageAccessToken); 

請幫

+1

如果說稍後再試,稍後再試 –

回答

3

終於找到了答案研究兩天之後。希望它能幫助別人。 **解決方案:**

date_default_timezone_set('America/New_York'); 
     $epochTime = strtotime("now +15 minute"); 
     $data = [ 
      'message' => 'Your message', 
      'no_story' => 0, 
      'link'=>'http://www.planwallpaper.com/static/images/Winter-Tiger-Wild-Cat-Images.jpg', 
      'picture'=>'http://www.planwallpaper.com/static/images/Winter-Tiger-Wild-Cat-Images.jpg', 
      'published' => 0, 
      'scheduled_publish_time' => $epochTime 
     ]; 
$response = $fb->post('/'.$post->page_id.'/feed', $data, $pageAccessToken); 

您還可以使用鏈接屬性提供鏈接。