在单个页面上有多个Facebook评论框? [英] Multiple facebook comment boxes on a single page?

查看:137
本文介绍了在单个页面上有多个Facebook评论框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个网页上列出了三个产品,我想在每个产品的侧面添加一个小评论框,类似: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>

似乎向< fb:comments> 块添加 xid 只为那个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&amp;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&amp;locale=en_US&amp;numposts=5&amp;sdk=joey&amp;title=&amp;url=https%3A%2F%2Fnorthsocial.com%2Fapp%2Ftab%2Ffeatured_products%2Fview.php&amp;width=255&amp;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

但是,您是否尝试指定唯一每个注释框的网址?

However, did you try specifying a unique URL for each of the comment boxes?

这篇关于在单个页面上有多个Facebook评论框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆