开发者

How do I display post without comments using the Comments plug-in

Below is the code generated from facebook plugins page:

<div id="fb-root"></div>
 开发者_StackOverflow社区               <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";
                        fjs.parentNode.insertBefore(js, fjs);
                    } (document, 'script', 'facebook-jssdk'));</script>

                <div class="fb-comments" data-href="example.com" data-num-posts="1" data-width="200"></div>

How can I display only 1 post on my website but hide all the comments for that post?


There is not an option for this with the Facebook comments plugin. You could pull down all comments and render the post you wanted yourself via the graph api with this style url: https://graph.facebook.com/comments/?ids=http://developers.facebook.com/docs/reference/plugins/comments

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜