Facebook 点赞问题,所有帖子计数相同
是啊,我已经搞了一天了,还是没能解决这个问题。
网站:example.com 链接
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexamle.com&layout=button_count&show_faces=false&width=80&action=like&font=arial&colorscheme=light&locale=en_US" scrolling="no" frameborder="0" allowtransparency="true" style="border:none; overflow:hidden; width:80px; height:30px"></iframe>"
我正在使用类似 iFrame 的 api,带有类似或 的
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexamle.com&layout=button_count&show_faces=false&width=80&action=like&font=arial&colorscheme=light&locale=en_US" scrolling="no" frameborder="0" allowtransparency="true" style="border:none; overflow:hidden; width:80px; height:30px"></iframe>
,但它们似乎具有相同的投票值,即使您直接访问 url,有人知道为什么吗?
非常感谢,
即使使用FB:像这个问题仍然发生
<fb:like href="http://examle.com" layout="button_count" show_faces="false" width="80" action="like" font="arial" colorscheme="light" class=" fb_edge_widget_with_comment fb_iframe_widget"></fb:like>
我已经添加了
<meta property="og:title" content="Google Nexus S - Black unlocked"/>
<meta property="og:type" content="product"/>
<meta property="og:url" content="http://examle.com"/>
但它仍然不起作用? Lint'er 说 http://examle.com?
linter 现在会选取正确的 URL,但 Like 按钮仍然保存相同的值...
Right, I've been at this all day and I still can't fix it.
Website: example.com
I am using the iFrame like api with a link like
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexamle.com&layout=button_count&show_faces=false&width=80&action=like&font=arial&colorscheme=light&locale=en_US" scrolling="no" frameborder="0" allowtransparency="true" style="border:none; overflow:hidden; width:80px; height:30px"></iframe>"
or
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexamle.com&layout=button_count&show_faces=false&width=80&action=like&font=arial&colorscheme=light&locale=en_US" scrolling="no" frameborder="0" allowtransparency="true" style="border:none; overflow:hidden; width:80px; height:30px"></iframe>
But they seem to have identical vote values, even if you visit the url directly, does anyone know why?
Many thanks,
Even using FB:Like this problem still occurs
<fb:like href="http://examle.com" layout="button_count" show_faces="false" width="80" action="like" font="arial" colorscheme="light" class=" fb_edge_widget_with_comment fb_iframe_widget"></fb:like>
I have added
<meta property="og:title" content="Google Nexus S - Black unlocked"/>
<meta property="og:type" content="product"/>
<meta property="og:url" content="http://examle.com"/>
Yet still it doesn't work? The Lint'er says http://examle.com?
The linter now picks up the correct URL, but the Like buttons still all save the same value...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您缺少一些开放图谱元标记:
og:url
和fb:admins 或 fb:app_id
请参阅 Like 插件(开放图标签)。如果您在 URL Linter 中测试这两个 URL,您会发现 Facebook 正在捕获相同的 URL! (URL1 - URL2< /a>)
You are missing some Open Graph Meta tags:
og:url
andfb:admins or fb:app_id
refer to Like Plugin (Open Graph Tags).If you test both urls in the URL Linter, you'll notice that Facebook is capturing the same URL! (URL1 - URL2)
问题是,虽然元标签在页面上,但它们在标题中很远,有 100 行+
这意味着 Facebook 没有拾取它们,将元标签移动到文档的前 5 行解决了问题。我猜 FB 只下载您网站的前 X 行/字节。
非常感谢 ifaour,为我指出了 URL Linter!
Ps 在这个 FB 之上已经缓存了所有以前的喜欢,所以我必须稍微更改所有链接(我刚刚添加了?n)才能将其识别为新链接!
The problem was, although the meta tags were on the page, they were very far down in the header which was 100 lines+
This meant Facebook wasn't picking them up, moving the meta tags to the first 5 lines of the document fixed the problem. I guess FB only downloads the top X lines/bytes of your website.
Many thanks to ifaour, for pointing me at the URL Linter!
P.s. On top of this FB has cached all the previous likes so I had to change all the links slightly (I just added ?n) for it to recognise it as a new link!