Facebook comments - Moderation not working - facebook

I am trying to add comments to my Website.
I have followed basic instructions at https://developers.facebook.com/docs/plugins/comments/ and comments box appears..
I want to enable Moderation, so followed instructions at https://developers.facebook.com/docs/plugins/comments/#moderation-setup-instructions but I am not able to get the moderation tool to work.. I expect to see comments appearing at https://developers.facebook.com/tools/comments/ or see the moderation link on each page with comments, but neither are happening..
I have included the fb:app_id and og:url and have no issues when viewing on https://developers.facebook.com/tools/debug/sharing and tried including the fb:admins (but the guide above suggests i should not include both)

I've been searching for answer for 2 days. In my case problem was with data-url attribute. I have publications in multiple languages and I set data-url value without language info, so that comments in other languages be seen in each language. But as I see now facebook does not allow that kind of data-url value. I set that value same as exact url in browser and everything works, also I will suggest adding og:url value same as exact url.
Hope this will help somebody!

You just need to add og alternate languages meta tag like below
<meta property="og:locale" content="en_US" />
<meta property="og:locale:alternate" content="ka_GE" />
First is the current language (example: domain.com/en/item/1)
Second is the alternate language url (example: domain.com/ka/item/1)

How it worked for me...
1º Step - Find your user ID:
On Facebook Interface:
Click in the top right of Facebook.
Select Settings & Privacy, then click Settings.
Click Apps and Websites in the left menu.
Click View and edit next to an app or game.
Scroll down to Learn more. Your user ID is in the paragraph below.
Facebook doc about that: https://www.facebook.com/help/1397933243846983
2º Step - Find your APP ID or create one here:
https://developers.facebook.com/tools/comments/
3º Step - Add these tags inside HEAD of your page (NEEDS TO BE IN HEAD ONLY):
<meta property="fb:admins" content="[YOU FACEBOOK USER ID]"/>
<meta property="fb:app_id" content="[YOUR APP ID]" />
4º Step - Set this script where you want to show the comment box:
<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/pt_BR/all.js#xfbml=1&appId=[YOUR APP ID]";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="[URL OF YOUR PAGE]" data-num-posts="5" data-width="815" data-colorscheme="light" data-mobile="false" data-order-by="reverse_time"></div>

Related

Facebook og:url ignored in favour of a Facebook hosted page about the og entity

I am trying to implement the Like button on my pages.
Those pages represent the review page for a product. When a user Likes the page, it shows up in Facebook (not as a link, but as liking an entity), however when you click on the entity in Facebook it links through to a facebook.com hosted page representing the page. I want the user to be redirected to the og:url page?
This happens for example when you Like an artist page on Grroveshar: http://grooveshark.com/#!/artist/Elbow/4795
I am clearly "doing it wrong".
I am using the following markup to include the SDK. MYAPPID is included by the code generator Facebook provides so I assume it is required.
<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&appId=MYAPPID";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Then my code to render the Like button.
<div class="fb-like" data-send="false" data-width="450" data-show-faces="true"></div>
And finally my og tags:
<meta property="og:title" content="My product" />
<meta property="og:type" content="product" />
<meta property="og:url" content="http://site.com/product_1/" />
<meta property="og:image" content="http://site.com/image1.jpg" />
<meta property="og:site_name" content="My-Site-Name.com" />
<meta property="fb:admins" content="MYFACEBOOKID" />
<meta property="fb:app_id" content="MYAPPID" />
Thanks!
It sounds like you're confusing the Admin Page for that URL with the URL itself, but i could be wrong because the admin page has a message at the top explaining this which looks like this:
Only the admins will see the on-Facebook admin page, and other users will be brought back to the og:url value defined on the URL which was liked. If you're not specifying a data-href parameter in the HTML5 Like plugin, this will be the current page or whatever the og:url value is on the current page's meta tags
Check what Facebook's Debug Tool says for the URL you're trying to like and make sure the tags are being read correctly
The problem with the grooveshark example is the fact they are using #! urls. If you wereto like http://grooveshark.com/artist/Elbow/4795 instead it would work correctly. If you are using such URL patterns than you will run into problems, and you would need to override the like button to hit the url without it.

how to delete comments on facebook comment box?

Right now i am using facebok comment box and i have made my self as moderator for this comment box.
<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&appId=288593874528383";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
I have specified my admin in meta tag
<meta property="fb:admins" content="{YOUR_FACEBOOK_USER_ID}"/>
What is the way to delete any comments given by any user on facebook commentbox?
http://developers.facebook.com/docs/reference/plugins/comments/
Specify fb:app_id as meta property in head of the html doc, like:
<meta property="fb:app_id" content="123456"/>
and repalce 123456 with your app id. Than, if you are the admin of the fb app, you should be able to moderate the comments using this link: https://developers.facebook.com/tools/comments
You can use the graph API to delete comments. Does that help?
Moderation Setup
To use the moderation tool, you either need to connect a Facebook account or a Facebook app to your Comments plugin implementation.
Setup using a Facebook Account
Simply include the following meta tag in the section of every document in which you use the comments plugin:
A. <meta property="fb:admins" content="{YOUR_FACEBOOK_USER_ID}"/>
OR
Setup using a Facebook App
B. <meta property="fb:app_id" content="{YOUR_APP_ID}" />
Source: https://developers.facebook.com/docs/plugins/comments#moderation-setup-instructions

Facebook comments shows warning "site unreachable" but still works

I'm developing a site implementing "facebook comments". One particular feature of the site is that I plan to have many pages implementing "facebook comments", which are generated automatically through server-side programming.
In theory this should be no problem... I included the following javascript code that was generated for me:
(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=MY_APP_ID";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
The Html tag I included is the following:
<div class="fb-comments" data-href="www.myurl.com/user/{{user.id}}" data-num-posts="20" data-width="500"></div>
Regarding the above, you'll note that I'm using python-django, so there is a server-side variable within the double curly brackets. This allows me to have the same functionality on many automatically generated pages.
Everthing seems to be working perfectly. Every individual page has its own respective implementation of facebook comments.... EXCEPT, I'm getting this annoying warning message "Warning: (MY URL) is unreachable." Obviously it IS being reached because it's working properly! So, why is it showing the warning message, and how do I get rid of it?
I tried adding the whole slew of meta properties, but no effect:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml" version="XHTML+RDFa 1.1">
<head>
<meta property="fb:admins" content="<MY_FB_ID>" />
<meta property="og:site_name" content="bowlofgoals" />
<meta property="fb:app_id" content="<MY_APP_ID>" />
<meta property="og:title" content="Bowl of Goals"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="<URL>"/>
<meta property="fb:moderator" content="<MY_FB_ID>" />
Also, please note that I have also implemented facebook connect in the root folder of the site. So, my "Site URL" in my app setting is the root folder, not the sub-pages where the facebook comments is implemented.
All the functionality is working perfectly.... so what should I do to get rid of that annoying warning message?
Thank you very much for any guidance you can offer on this.
Mark
Consider checking your page for javascript errors. I had the exact same problem as you did and no matter what tags I added, no matter what I did, the plugin wouldn't work.
After taking a closer look in Firebug I noticed I had one javascript error caused by some slider script in my template. Removed that script and everything works like a charm now.
I assume that error was breaking all my javascript including Facebook's and that's why the plugin didn't work.
I got rid of that error by changing the data-href to the value that I set in Website with Facebook Login Site URL. So I have http://domain.org/contest/ in my Site url and my data-href to http://domain.org/contest
But I do have the same issue as you where my comments plugin is in a bunch of pages where the url is dynamic so something like http://domain.org/contest/id/13131 or http://domain.org/contest/id/4848 but I cant put either one of those urls in my data-href. I have to put http://domain.org/contest instead in order to get rid of that error.

how to moderate comments from social plugin facebook?

I've just added this snippet to my wordpress blog...
<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_GB/all.js#xfbml=1&appId=145875562182317";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
With the code below on my single.php template.
<div class="fb-comments" data-href="<?php the_permalink() ?>" data-num-posts="10" data-width="642"></div>
Source taken from facebook developers site...
http://developers.facebook.com/docs/reference/plugins/comments/
This has added a sweet facebook comments box onto my blog posts. But I need to moderate the comments some how?
So I've read the documentation and it says add this meta into your head with my user ID.
<meta property="fb:admins" content="6468594984"/>
This seemed to work, only if I went to that post when I was logged in as facebook user 6468594984 - and I could see a moderator view button on the comments box. So this worked.
How ever this is slightly impractical.. so I went to the next level.
I created a facebook app with the correct site URL on the website tab ending with... /
Changed my previous meta for this...
<meta property="fb:app_id" content="766484684648"/>
and I presumed by going to...
http://developers.facebook.com/tools/comments
...that I could now moderate all the comments for my wordpress site by viewing app 766484684648.
But no comments are appearing on app id 766484684648 within the tools comments site.
Can any one help enlighten me on where I've gone wrong or where I need to fix.
Thanks hugely!!!
After you changed your meta tag, did you run your URL through the URL Linter? Perhaps Facebook just had not detected the change you made to the meta tag, due to caching.
Try pasting the URL you use for the comments module into http://developers.facebook.com/tools/debug and verify that there are no errors, and that the app id is coming through.

Facebook Like - Won't keep track of Likes after browser refresh

I'm implementing Facebook's "Like" option in one of my websites as a voting tool. Users will be able to vote on a specific team by Liking the team's individual page. I have a number of teams and for some reason when I "Like" some of the teams, refresh my browser, my Like count refreshes as if I never "Liked" the page at all. However, on some of the other teams pages, when I "Like" and refresh, the count is accurate and keeps track.
I can't seem to find what is differentiating between the team pages that work and don't work. Code is identical but some keep the Like count and some don't. I was hoping someone may have experienced this before?
Below is the HTML5 Like option I used:
<div class="votePanel">
<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#appId=262057453824946&xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-send="false" data-layout="button_count" data-width="120" data-show-faces="false" data-font="arial"></div>
</div>
Below are my Open Graph tags:
<meta property="og:title" content="My Page Title" />
<meta property="og:type" content="movie" />
<meta property="og:url" content="<% response.write("http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")) %>" />
<meta property="og:image" content="PATHTOMYIMAGE" />
<meta property="og:site_name" content="Site Title" />
<meta property="og:admins" content="MYADMINID" />
<meta property="og:description" content="DESCRIPTIONHERE" />
Ah, I've got it working with a few resources.
First, I used Facebook's Debugger to check my open graph tags and make sure they were valid. I noticed that my Like button required an admin ID. Also, on the Debugger page you can actually demo your Like button and it will display an error message if necessary.
I received the message:
"The page failed to provide a valid list of administrators. It needs to specify the administrators using either a "fb:app_id" meta tag, or using a "fb:admins" meta tag to specify a comma-delimited list of Facebook users."
What I noticed was that I had my fb:admins tag mixed up with og:admins. I switched the letters up and all was fixed!
However, I'm still not sure why a few of my pages allowed the Like button to work prior to the fix.
I've noticed this happen on my sites before too. There's usually a missing or incorrect open graph tag that's required. It's really strange how it works anyway on some pages but not others. I highly recommend using the debugger tool too. It points out what is wrong.