Facebook social plugin comments after URL change

南楼画角 提交于 2019-12-30 11:13:10

问题


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.


回答1:


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.




回答2:


you can specify the old URL as “canonical” with an og:url meta tag. see the FAQ about this.




回答3:


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.



来源:https://stackoverflow.com/questions/8133406/facebook-social-plugin-comments-after-url-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!