URL 更改后 Facebook 社交插件评论
只是一个简单的问题,我的页面中集成了 Facebook 评论:
http://www.bbcnepalidrama。 com/main/node/3
现在我已经更改了 URL 别名,如下所示:
http://www.bbcnepalidrama.com/main/about
我还在旧 URL 中设置了 301 重定向,该重定向将重定向到新 URL。 问题是如何获取此 URL 中的旧评论?他们现在失踪了。
Just a simple question, I had facebook comments integrated in my page here:
http://www.bbcnepalidrama.com/main/node/3
Now I have changed the URL alias like this:
http://www.bbcnepalidrama.com/main/about
I have also set a 301 redirect in the old URL which redirects to the new one.
The Question is how do I get the old comments in this URL? They are missing now.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为,这些评论将永远与该 URL 相关联,并且由于您已经更改了它,就 FB 而言,您指向了不同的 URL。
I think, that these comments will be forever associated with that URL and since you've changed it, as far as FB is concerned you are pointing to a different URL.
您可以使用
og:url
元标记将旧 URL 指定为“规范”。请参阅有关此问题的常见问题解答。
you can specify the old URL as “canonical” with an
og:url
meta tag.see the FAQ about this.
这在 Facebook 评论中很糟糕。我启动了一个集成了 Facebook 评论的网站,但没有设置 URL,现在当我这样做时,评论不会显示。
您的情况似乎很简单,因为您似乎正在使用 Drupal。您可以安装 token 和 token_filter 模块,这样您就可以将 facebook 评论代码添加到块中,并使用将从当前页面返回节点 id 的适当令牌。
This sucks in Facebook comments. I've launched a site with Facebook comments integrated, without setting the URL, and now when I do, the comments doesn't show up.
Your case seems to be easy, since it seems you're using Drupal. You can install the token and token_filter modules, so you can add the facebook comments code to a block and use the appropriate token that will return the node id from the current page.