Facebook Like Button无法获取正确,标题,描述,图像

时间:2011-12-19 02:12:50

标签: facebook .htaccess facebook-like

我已经按照我理解的方式设置了所有元属性。目前,当我'喜欢'页面时,它只发布信息索引主页。图像是标记中写入的最后一个图像。

我的页面结构使用.htaccess创建漂亮的URL(它不是wordpress)。

<meta property="og:title" content="This is a unique shop title"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="http://mysite.com/shops/uniqueshop"/>
<meta property="og:image" content="http://mysite.com/uploads/uniqueimage.jpg"/>
<meta property="og:description" content="Interesting general description. Same on all pages"/> 

'喜欢'按钮代码是

  <iframe src="//www.facebook.com/plugins/like.php?href=www.mysite.com/shops/uniqueshop&amp;send=false&amp;layout=button_count&amp;width=100&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;margin:0;" allowTransparency="true" class="like social"></iframe>

Facebook是否喜欢绕过.htaccess?

2 个答案:

答案 0 :(得分:0)

使用基于Javascript SDK的按钮代替基于iframe的按钮,这应该可以解决您的问题。

http://developers.facebook.com/docs/reference/javascript/

当您从此页面获取代码时,它是(默认)HTML5选项:

http://developers.facebook.com/docs/reference/plugins/like/

答案 1 :(得分:0)

相关问题