2012-10-09 83 views
1

我想用facebook圖形API在朋友牆上做牆貼。 一切正常,但圖像顯示。 這是我的代碼。Facebook post image not display

$attachment = array(
      'message' => $d['giftmsg'], 
      'name' => 'You have received a gift voucher for ' . $dd['title'] . '!' . '', 
      'link' => $plink, 
      'description' => " Login to the Tippll facebook app to claim you gift card. Your friends can click on the like above to top up this gift even further!", 
      'picture' => $img_url, 
      'actions' => array('name' => 'Top-Up This Gift', 'link' => $plink) 
     ); 

    $post = $facebook->api('/' . $_POST['friend_id'] . '/feed', 'POST', $attachment); 

這裏$ img_url包含有效的URL,並將其顯示圖像當我進入這個網址到瀏覽器的地址欄中。但Facebook並沒有把它提交給我的文章。 我嘗試了來自其他服務器的圖片,它在其他服務器上託管的圖像,但不在我的服務器上。 我使用htaccess將www重定向到非www。 請給我解決方案。 Thanx提前,

回答

3

可能有2倍可能的原因:

  1. 您的圖片不能被Facebook訪問了Facebook首先獲得的圖像,並將其存儲在他們的雲。
  2. 你的主機是被Facebook禁止並不再從您的網址的
+0

感謝名單@Mihai接受圖片...這是我的形象.. https://www.tippll.com/welcome/deal_images/krishna。 jpg 可能是什麼問題? –

+0

你看不到SSL錯誤嗎?如果您有錯誤,Facebook將不會訪問它。 –

+0

非常感謝Mihai ... –