2012-07-19 151 views
0

我已經整合了所有facebook按鈕的代碼。但它不能正常工作。facebook like按鈕無法正常工作

假設我在我的產品詳細信息頁面&我給了Facebook像按鈕產品圖像的Facebook。 如果用戶點擊此按鈕,則按鈕數將增加&此帖可以在用戶的​​個人資料頁面上看到。我的問題是,當我點擊這個按鈕數有適當的增量,但是當我在我的Facebook個人資料頁上看到它共享我的域鏈接,標題,說明&圖像。而不是我要顯示的產品網址,產品標題,產品說明&產品圖片。我做了以下代碼。

在「頭」標記我寫了這個代碼

<meta property="fb:app_id" content="123456789"/> 
<meta property="og:title" content="Bliise"/> 
<meta property="og:url" content="{$siteroot}/products/{$smarty.get.id1}/{$smarty.get.id2}/products"/> 
<meta property="og:image" content="{$siteroot}/image.php?height=500&width=360&image=/product/{$prodDetails.product_image}"/> 
<meta property="og:description" content="Bliise"/> 
<meta property="og:site_name" content="Bliise"/> 
<meta property="og:type" content="Brand"/> 

在「身體」的標籤。我寫這個代碼

<div id="fb-root"></div> 
<script>(function(d, s, id) { 
    var js, fjs = d.getElementsByTagName(s)[0]; 
    if (d.getElementById(id)) return; 
    js = d.createElement(s); js.id = id; 
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; 
    fjs.parentNode.insertBefore(js, fjs); 
}(document, 'script', 'facebook-jssdk'));</script> 

&這是我的facebook像按鈕

代碼
<fb:like href="{$siteroot}/products/{$smarty.get.id1}/{$smarty.get.id2}/products" layout="button_count" style="float:left; width:70px; margin:12px 0px 0px 12px;" show_faces="false" width="240" height="40" action="like" colorscheme="light"></fb:like> 
+0

已清除Facebook的緩存? http://developers.facebook.com/tools/debug – ahren 2012-07-19 05:06:16

+0

是的......但同樣有問題......它分享http://www.techmodi.com/demo/bliise/而不是http:// www .techmodi.com/demo/bliise/products/MTU =/MTQ =/products/ – 2012-07-19 05:13:46

+0

anybody there ... – 2012-07-19 05:30:23

回答

1

This會幫你找到問題

而且不要忘了補充:

<html xmlns="http://www.w3.org/1999/xhtml" 
     xmlns:og="http://ogp.me/ns#" 
     xmlns:fb="https://www.facebook.com/2008/fbml">