2011-02-11 222 views
1

我想在我的網站上實現Facebook Like按鈕。它在一個子域。Facebook喜歡根域

我試過把鏈接放在Like按鈕的腳本標記中,現在我試圖使用Open Graph元標記。兩者都不起作用。我有:

<meta property="og:title" content="My Site"/> 
<meta property="og:type" content="article"/> 
<meta property="og:image" content="http://www.example.com/image1.png"/> 
<meta property="og:url" content="http://mysite.example.com/"/> 
<meta property="og:site_name" content="My Site"/> 
<meta property="fb:app_id" content="123123123"/> 

而且按鈕:

<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like show_faces="false" width="450"></fb:like> 

它的工作原理,但是當我喜歡的東西,它說:

約翰喜歡我在example.com網站。

如何使其使用子域?我也在應用程序設置中列出了子域。

感謝

+0

你是什麼意思?`我也在應用程序設置中列出子域? – ifaour 2011-02-12 11:55:02

回答

0

嘗試添加頁面的完整URL喜歡上了FB href值:像元素。例如:

<fb:like href="http://mysite.example.com/" show_faces="false" width="450"></fb:like>