开发者

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

开发者 https://www.devze.com 2023-04-09 22:36 出处:网络
Below is the code generated from facebook plugins page: <div id=\"fb-root\"></div> 开发者_StackOverflow社区<script>(function (d, s, id) {

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

精彩评论

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

关注公众号