0

我正在使用 Javascript SDK 在我们的网站上实现 Facebook“点赞”按钮。

它工作得很好,但是当用户发表评论时,该消息会链接回 <head> 部分中的规范链接。

这是非常不受欢迎的行为。为什么要麻烦手动提供一个链接来覆盖它?

有人知道解决方案吗?

4

2 回答 2

3

不 - 这是 Like 系统的一个功能。

这就是它如何知道对看起来完全不同的 URL 的“喜欢”实际上是对同一个资源的。这样做是故意的——我同意实施。

简而言之 - 这是按预期行事。要么转储规范链接,要么以不同的方式实现它。

于 2010-10-22T16:18:19.083 回答
0

I agree that this should be the behaviour; partly because I can't think of a reason to specify a canonical link that you don't want to use?

I found this question because I had the opposite problem in that my canonical link seemed to be being ignored, so I presume they have fixed this feature in Facebook

For me the data-href attribute overrides the canonical meta tag

<div class="fb-like" data-href="YOU_LINK_GOES_HERE" data-send="false" data-layout="button_count" data-width="45" data-show-faces="false" data-font="lucida grande"></div>
于 2013-04-17T11:50:53.670 回答