开发者

Remove Facebook Comments from Site

开发者 https://www.devze.com 2023-04-12 17:34 出处:网络
I\'ve got the basic comment box on my site. NOT attached to an app or part of one (as I don\'t develop apps).

I've got the basic comment box on my site. NOT attached to an app or part of one (as I don't develop apps).

    <div id="fb-root"></div>

                                <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="http://www.-----.com/tech" data-num-posts开发者_JS百科="3" data-width="500" data-colorscheme="dark"></div>

In the head tag:

<meta property="fb:admins" content="My User ID"/>

Now, when someone comments on a friend's comment, I don't want that to show on my site. How the heck can I remove the comments from my site!? This is driving me insane.

So other than this https://developers.facebook.com/tools/comments, what can I do to remove some of these comments?


Ensure that you have replaced the code with your user_id from facebook

You can find out your user id by going to the following address: http://graph.facebook.com/[YOUR USERNAME]

For example, mine is http://graph.facebook.com/coulton resulting in the following.

<meta property="fb:admins" content="543270572"/>

This must be in the tag of the page which contains the Comments plugin

Now when you're logged in to Facebook with this account, you will see a "moderator view" button appear at the top of the comments window.

Remove Facebook Comments from Site

You should now see the interface to edit the comments from your site.


Also when you don't develop an app on FB, you can use the comments-tool from facebook and it's what I strongly recommend, because it's the easiest one. The comment-box itself can be registered to an app and you don't need to write a real app to use it, that's just what Facebook calls it.

So therefore you just create an 'app', which is only responsible for comment administration. Create an app and register it in your meta-tags with fb:app_id on your page with the comment box! Instantly you can use it to moderate all your comments.

The other solution is to be logged in with the user defined in the fb:admins tag and go to the comment box and choose moderation view. Use the tips mentioned by Coulton. Use the debugger to see if everything is set up right.

0

精彩评论

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