单页上的多个Facebook评论框? [英] Multiple facebook comment boxes on a single page?
问题描述
我在一个页面上列出了三个产品,我想在每个产品的边上添加一个小评论框,类似于: https://www.facebook.com/SanukFootwear?ref=ts&sk=app_113298085356151 。主要的问题是,我似乎无法弄清楚如何在页面上添加多个评论框。
I have three products listed on a single page and I'm looking to add a small comment box to the side of each of the products, kind of like : https://www.facebook.com/SanukFootwear?ref=ts&sk=app_113298085356151. The main problem is, I can't seem to figure out how to add more than one comment box to the page.
我尝试使用HTML5和XFBML。我现在使用的代码是:
I tried using HTML5 and XFBML. The code I'm using now is :
< html xmlns:fb =http://ogp.me/ns/fb# >
<script>
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=MYAPPID";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
和
< fb:comments href =MYURLnum_posts =5width =500xid =product_01>< / fb:comments>
似乎将 xid
添加到< fb:comments>
块应该是为唯一的xid生成唯一的注释列表。但是这不行。如果我执行以下操作:
It seems that adding xid
to the <fb:comments>
block is supposed to generate a unique list of comments for only that xid. This however is not working. If I do the following:
< fb:comments href =MYURLnum_posts =5width =500xid = product_01>< / fb:comments>
< fb:comments href =MYURLnum_posts =5width =500xid =product_02>< / fb:comments>
并尝试发布一个,评论出现在两者上。有没有什么我想要允许这些独特的评论?
and try posting on either one, the comment shows up on both. Is there something I'm missing to allow these unique comments?
来自sanuk店facebook页面的代码是:
The code from the sanuk shop facebook pages is this:
<fb:comments xid="featured_product_56062795998_1" width="255" numposts="5" expr:href="##_1" class=" fb_iframe_widget">
<span>
<iframe id="f1f0d95ac" name="f341a4ded" scrolling="no" style="border-width: initial; border-color: initial; overflow-x: hidden; overflow-y: hidden; width: 255px; height: 572px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; " class="fb_ltr" src="https://www.facebook.com/plugins/comments.php?api_key=113298085356151&channel_url=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df5542ec34%26origin%3Dhttps%253A%252F%252Fnorthsocial.com%252Ff2d77af7ec%26relation%3Dparent.parent%26transport%3Dpostmessage&locale=en_US&numposts=5&sdk=joey&title=&url=https%3A%2F%2Fnorthsocial.com%2Fapp%2Ftab%2Ffeatured_products%2Fview.php&width=255&xid=featured_product_56062795998_1"></iframe>
</span>
</fb:comments>
我不知道他们从哪里获取这个iFrame内容。我提到了facebook开发文档,但是一直无法找到任何信息。任何帮助将不胜感激!
I have no idea where they are getting this iFrame content from. I referred to the facebook development docs, but have been unable to find any information. Any help would be appreciated!
提前感谢
Tre
推荐答案
评论插件没有我可以看到的xid参数: https://developers.facebook.com/docs/reference/plugins/comments
The comments plugin doesn't have a xid paramter that I can see at: https://developers.facebook.com/docs/reference/plugins/comments
然而,您尝试为每个注释框指定唯一的URL?
However, did you try specifying a unique URL for each of the comment boxes?
这篇关于单页上的多个Facebook评论框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!