Facebook 点赞计数在 301 重定向后重置
我的网站上有一篇文章发布在错误的类别中。我想更改类别,并且由于类别名称是 url 的一部分,因此我向更新后的 url 添加了 301 重定向。 那篇文章也有几个赞,但在 301 之后,它被重置为 0 个赞,因为对于 Facebook 来说,这现在是一个没有赞的新网址。 如果我删除 301,那么点赞数会再次更新。 有没有办法通知 FB 某个 url 是具有点赞数的 301 的结果? 我认为它也与带有 FB 评论的页面相关
I have an article on my site that has published in a wrong category. I wanted to change the category, and since the category name is part of the url, I than added a 301 redirection to the updated url.
That article had also several likes, but after the 301, it was reset to 0 likes, since to Facebook this is now as a new url with no likes.
If I remove the 301 than the likes count is updated again.
Is there a way to notify FB that a certain url is a result of a 301 that has likes count?
I assume it is relevant as well for pages with FB comments
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将“赞”按钮的“href”或“data-href”属性设置为具有“赞”计数的原始网址,具体取决于您使用的“赞”按钮。 Facebook 不会遵循重定向。
You would need to set the "href" or "data-href" property of the like button to the original url that had the like counts, depending on which like button you are using. Facebook will not follow redirects.