2012-07-17 93 views
0

我在facebook應用頁面上使用facebook像按鈕。當用戶喜歡一個頁面時,只有該URL被髮布到他們的牆上。我如何獲得Facebook的帖子來顯示圖像和說明

我曾嘗試以下

<meta property="og:title" content="my content" /> 
<meta property="og:image" content="my content"/> 
<meta property="og:description" content="my content"> 
<meta property="og:type" content="product"> 
<meta property="og:url" content="my content"> 
<meta property="og:site_name" content="my content"> 
<meta property="fb:app_id " content="APPID"> 

一起

<meta name="title" content="mycontent" /> 
    <meta name="description" content="mycontent" /> 
    <link rel="image_src" type="image/jpeg" href="mycontent"/> 

被寫入該應用程序是軌道。有沒有人得到這個解決方案。

+0

是''一個完全合格的URL?或者它是一個相對的網址? – 2012-07-17 18:51:29

+0

完全限定它是... – 2012-07-17 18:55:52

+0

未經驗證即可訪問? – 2012-07-17 19:16:01

回答

1

不要忘了Open Graph的命名空間:

<!DOCTYPE html> 
<html xmlns:fb="http://ogp.me/ns/fb#" lang="en" style="overflow:hidden;"> 
    <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# <?php echo AppInfo::appNamespace(); ?>: http://ogp.me/ns/fb/<?php echo AppInfo::appNamespace(); ?>#"> 
     ... 

使用Facebook Open Graph Debugger檢查您的網站。

相關問題