I am trying to set up the comments box on my site.
I have created an app for doing that.
On site I have the meta code for fb app id
<meta property="fb:app_id" content="1000000000000000" />
inside the head tags.
And I have this piece of code for facebook:
<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/sdk.js#xfbml=1&version=v2.8&appId=1000000000000000 ";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
At the right place of the page I have a div with fb-comments class. The comment plugin works BUT the comments are not shown at https://developers.facebook.com/tools/comments.
When I go to debug at https://developers.facebook.com/tools/debug/sharing
and insert there my page link I get some strange warnings saying among other things that
The 'fb:app_id' property should be explicitly provided, Specify the app ID so that stories shared to Facebook will be properly attributed to the app. Alternatively, app_id can be set in url when open the share dialog.
But I have this meta tag with fb:app_id property!
What am I doing wrong?
Cheers.
Related
I installed Facebook Comment Plugin for a comment box. For this, I used this meta tag related to Facebook App ID
<meta property="fb:app_id" content="228435337504344" />
<meta property="og:url" content="http://bdlacne.byethost24.com/Dr.Thakur/" />
JavaScript SDK
<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 = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3"; fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));
</script>
And for comment box
<div class="fb-comments" data-href="http://bdlacne.byethost24.com/FacebookSocialPlugins/?ckattempt=1" data-numposts="5" data-order-by="time" ></div>
And it works fine with moderation tool.
Now I want to add another comment box (on another article and on the same page) tied with another App ID as I can set different moderation settings for each.
My query is how I can tie the multiple comment box with different App ID.
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 have integrated a Facebook Share button in my website. The one that you can generate here:
https://developers.facebook.com/docs/plugins/share-button/
But how can I tell it what title, message to show and what url to redirect to? It now all "tries" to automatically resolve this from the web page.
It uses the right title from the <title> tag. But the meta description tag is not working. And I also have no clue how to set a custom URL and image.
All I have now is:
This right below the opening of the 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/nl_NL/sdk.js#xfbml=1&appId=19158xxxxxxxxx&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
And this on a product detail page:
<div class="fb-share-button" data-type="button_count"></div>
How can I customize everything here?
You need to specify the og:title and og:description meta tags as per http://ogp.me.
Those are the tags that Facebook will initially scrape for the share info.
Alternatively you can use the javascript sdk and specify the title, URL, description, etc manually as described in the documentation
I have added a facebook comment social plug in box here: www.example.com/guestbook.html
I have included the following line of code on the page:
<meta property="fb:app_id" content="370981509585131"/>
I do have this SDK code at the top of the page:
<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=370981509585131";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
So I have the SDK with the AppID in there, and I added the code as instructed on this
page but I have not been able to moderate the comments from the comment moderation tool
Seems like you have wrong value for fb:admins OpenGraph meta tag:
Object at URL 'http://www.forumgoesmody.com/guestbook.html' of type 'website' is invalid because the given value '10100218701442679' for property 'fb:admins' could not be parsed as type 'fbid'.
Request to http://graph.facebook.com/10100218701442679 return false
You should fix the errors outlined in Object Debugger tool for URL of page your Comments Social Plugin located on. Once you fixed the errors you should be able to moderate your comments in Comments Moderation tool
You can simply remove fb:admins, if only Administrators of Application (fb:app_id) should be able to moderate the comments.
You could check my answer to similar probem at: https://stackoverflow.com/a/9073966/1134615. Not sure wether thats a proper solution but that works for me. Also, remove:
<meta property="fb:app_id" content="370981509585131"/>
as it is already stated in js.
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.