开发者

Facebook Like taking root domain

I'm trying to implement a Facebook Like button on my site. It's at a subdomain.

I've tried putting the link in the script tag of the Like button and now I'm trying to use Open Graph meta tags. Neither works. I have:

<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"/>

And the button:

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

It works, but when I like something it says:

John likes My Site on example.com.

How can I make it use the subdomain? I have the subdomain listed in the application settings as well.

Thanks


Try adding the full url of the page to like as the href value on the fb:like element. Something like:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜