Ok I'm sure this has been addressed somewhere, but as it currently stands I couldnt figure out the solution or find one on google....
I am implementing Facebook's comments box and my code is essentially a copy-paste of what is on the site
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<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=417087715031519";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</body>
<div class="fb-comments" data-href="file:///A:/commentsbox.html" data-width="470"></div>
</html>
Problem is that when I log in from my account and comment, I can see my comments, when I log in from another test account, I can only see that test accounts comments, and when I log in from another test account, again I can only see its comments. What am I doing wrong?
Note that I currently have this up on localhost and my APP is in test mode.
It seems I had a fundamental misunderstanding when asking this question. Test users cant view each others comments (which is how I was testing the comments box)..
Related
there's a problem at installing the new facebook page plugin. I create a simple test.html file with the following code including the plugin-code from https://developers.facebook.com/docs/plugins/page-plugin. But there is an error message from my browser that file://connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v2.4 cannot find on the server. I also completed the adress by http: or saved the Facebook-file local and embedded it as a local js-file, but the page plugin doesn't appear. What's the problem?!
HTML-Code in test.html:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<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/de_DE/sdk.js#xfbml=1&version=v2.4";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-page" data-href="https://www.facebook.com/facebook" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true" data-show-posts="true"><div class="fb-xfbml-parse-ignore"><blockquote cite="https://www.facebook.com/facebook">Facebook</blockquote></div></div>
</body>
</html>
You do not appear to be including an App ID in your URL for the SDK request. If you have not yet created an App ID, you can do so here: https://developers.facebook.com/apps
Note the appended &appId=[APP_ID_NUMBER_GOES_HERE] in the example below from my Website (real App ID removed, obviously)
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v2.4&appId=[APP_ID_NUMBER_GOES_HERE]";
The Facebook SDK quick start guide and documentation should answer any other question you have about getting started: https://developers.facebook.com/docs/javascript/quickstart/v2.4
Ok managed the problem. The only thing I had to do is uploading my site to an online server.
I have implemented the Facebook comments plugin to a page on my site. In addition to this I would like to be bale to moderate the comments. I followed the instructions on the Facebook developer section and implemented as described. I wanted to use the inline moderation tool rather than create an app. So I placed the following meta data.
<meta property="fb:admins" content="533551342"/>
Where the content is set to my Facebook profile ID.
I have then placed the script code as per Facebook developer instructions.
<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_GB/sdk.js#xfbml=1&appId=672941899483225&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
Once that is in place, I added the comments section to the site using the code instructed.
<div class="fb-comments" data-href="http://www.microspot.com/case-studies/boat_design.htm" data-width="540" data-numposts="10" data-colorscheme="light"></div>
So with all this in place the comments section shows and works, but the moderate link does not appear next to the number of posts text (which is what should happen according to face books documentation).
The web page is http://www.microspot.com/case-studies/boat_design.htm
Thanks in advance.
It seems the issue was not with the code but with Facebook re-indexing my changes. There is a tool on the Facebook developer page for debugging and indexing your changes.
Any update you make to the Facebook code on your webpage, especially the meta data, you should always use the following debug tool.
https://developers.facebook.com/tools/debug/
Simply paste your webpage link (should be a live page not local) into the box and follow the instructions each time you make a change.
<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_GB/sdk.js#xfbml=1&appId=672941899483225&version=v2.3";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
I am working on this site for a client: http://djzimmie.com/2012/03/08/miss-march-2011/
The linter says everything is okay, but when I go to like the page, I click like, and don't leave a comment, it doesn't show that I've liked it on my Facebook page. If I type in a comment, and then post, it shows up fine. I'm not sure what the problem is.
Any suggestions?
Okay here is some info:
Here is my namespace code:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#">
Here is a link to the linter that shows that everything is okay: http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fdjzimmie.com%2F2012%2F03%2F08%2Fmiss-march-2011%2F
Here is the code I am using right inside my body tag:
<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=158780564242930";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
And then last but not least the button code:
<fb:like send="false" layout="button_count" width="100" show_faces="true" font="arial"></fb:like>
As mentioned, I cant get the like button to show without leaving a comment. Any help would be greatly appreciated.
Followup to this was that FB was acting up....I went back to this a couple days later and it was working as expected
I am tring to implement the comments box into my website, providing the following code:
<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=204934639590323";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="http://my_web.com/" data-num-posts="2" data-width="500"></div>
When i post a message into the comments box, that message is not posted onto my wall. Also, when i logout from fb, that message dissapers. Hope to give me some ideas. Thanks.
If you logout of Facebook and then the comment disappears it seems a privacy configuration on your account, that's why when you become anonymous Facebook hides the comment.
Also, if the comment is not posted (despite you check you want this behavior on the comment box) maybe your app is in sandbox mode OR again you have specific configurations for this app.
To quickly have a better idea of what is going on you could ask someone else to comment.
Hope that helps.
I integrated FB comments on a static page. I can comment and see my comments, but I have problems with moderating comments in the moderation tool. There are no comments in the tool.
I have this code, which should help me to modearete:
<html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns="http://www.w3.org/1999/xhtml">
<meta property="fb:admins" content="7675xxxxx" />
<meta property="fb:app_id" content="xxxxx5675551420" />
And in inside the body I have:
<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/de_DE/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="http://www.example.com/demo" data-num-posts="10" data-width="900"></div>
What is the problem here?
By the way, how can I set it up, that also NON-Facebook Users can comment? I want to
allow anonymous comments. I see no settings for that?
thx
Did you added your user account as moderator in http://developers.facebook.com/tools/comments?
If not, try to add your user account in your application as moderator. Then see is it working.
Please note moderation tool will be available only for non-admins's comments. You cannot moderate your (or other admins') comments.
Edit: Moderators can moderate only 'normal' users comments. Try commenting from a FB account which is not in the comment moderators list.