English 中文(简体)
自动生成的Facebook注释框
原标题:Auto-generated facebook comments boxes

我在新闻网页上执行Facebook评论框。它很有效。问题在于如果我在一个页面上发表评论,它将会在所有页面上显示,这些页面都包含fb评论框。

目前我的代码是这样的:

<b><div class="fb-comments" data-href="http://selandia-ceu.dk/selandia/nyheder.aspx" data-num-posts="3" data-width="500"></div>

<script>
  var fb-comments = document.getElementById( fb-comments );  
  mydiv.innerHTML =
     <div class="fb-comments" data-href="  + document.location.href +  " data-num-posts="3" data-width="500"></fb:comments> ;  
  FB.XFBML.parse(fb-comments);
</script></b>

网站使用 Microsoft 服务器。 代码中的 URL 应该指当前页面 1 是查看。 有人知道我应该做什么吗? : :

注释在页面上暂时禁用 。

I got the extra bit of code (FB.XFBML.parse) from this thread: Different Facebook comment box after each ajax call

问题回答

您可能需要清理您的 Open 图表标签, 因为每个批注插件所指向的 URL 将被 Open 图形 Iinter 剪切, 并用于确定 罐头 URL 。 问题在于您的批注插件最终最终都指向同一个语句 URL :

< a href=" "https:// developers.facebook.com/tools/debug/og/og/object?q=http% 3A% 2F% 2F2F2Fselandia-ceu.dk% 2Fselandia% 2Fselandia% 2Fnyheder.aspx" rel="nofollow" >https://developers.facebook.com/tools/debug/og/object?q=http% 3A% 2F2F2Fselandia-ceu.dk% 2Fselandia% 2Fnyheder.aspx

使用此调试工具来检查您的打开图表标记, 并确保每页都有自己的 Canonic URL 。 您还需要按照调试器的建议, 校正 HTML 中的 fb:admins 标记 。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签