Facebook 点赞问题,所有帖子计数相同

发布于 2024-10-21 17:33:24 字数 1619 浏览 1 评论 0原文

是啊,我已经搞了一天了,还是没能解决这个问题。

网站:example.com 链接

<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexamle.com&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;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&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

面犯桃花 2024-10-28 17:33:24

您缺少一些开放图谱元标记:og:urlfb:admins 或 fb:app_id 请参阅 Like 插件(开放图标签)

如果您在 URL Linter 中测试这两个 URL,您会发现 Facebook 正在捕获相同的 URL! (URL1 - URL2< /a>)

You are missing some Open Graph Meta tags: og:url and fb: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)

彼岸花ソ最美的依靠 2024-10-28 17:33:24

问题是,虽然元标签在页面上,但它们在标题中很远,有 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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文