I have following code on http://septicsecurity.com/facebook.html
It used to work, but does not work any more. I do not understand why. What happened and what can I do to make it work again?
UPDATE - I just found out that it works after I threw out the old cash and reopened the browser(s)
I might also have something to do with that I updated the FB Manage Permissions page and took away any Country Restrictions.
UPDATE UPDATE - I'm a moron. I could not see it because I had installed a new app (DNT+) on FireFox that blocks social and ad networks from following you around the net. Subsequently it took away the FB like and comment box.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="author" content="paulk">
<title>Facebook</title>
</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=161799263843988";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!-- FACEBOOK START -->
<div style="float:left;margin-right:18px;">
<div class='fb-like-box' data-href='http://www.facebook.com/pages/Septic-Security/209608059122157' data-width='380' data-show-faces='true' data-stream='true' data-header='true'></div>
</div>
<div style="float:left;">
<div class='fb-comments' data-href='http://septicsecurity.com' data-num-posts='5' data-width='380' style='border:1px solid silver; height:588px;'></div>
</div>
<!-- FACEBOOK END -->
</body>
</html>
The floating divs above are just to position the like box and the comment box next to each other, I have tried to strip the page of all extra code like that and also just trying to show like box or comment box but it still does not work.
When I look at the page you linked, I see the Like Box and the Comment Box, side by side. (I'm using Chrome.) Did you make any changes to the code, or did it literally just stop working one day? What specific failure are you seeing, and what browser are you using?
This might also be pertinent: I think that I read that FB has changed their like-box recently; and they have more changes that will be taking effect on October 3:
https://developers.facebook.com/roadmap/#october-2012
Specifically, some Open-Graph functionality for the like buttons won't work any longer (nor will the Live Stream plugin and several other bits,) so you (and I, and everyone else) may have to update our FB like button code Real Soon Now.
I could not see it because I had installed a new app (DNT+) on FireFox that blocks social and ad networks from following you around the net. Subsequently it took away the FB like and comment box.
Related
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>
I want to add a Facebook like button in my website.
If I use the following code like button is working but on log in the error message : "An error occurred with Facebook Platform Opt In. Please try again later" is displayed.
<html>
<head>
<title>My Great Web page</title>
</head>
<body>
<iframe src="http://www.facebook.com/plugins/like.php?href=guiuiu"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>
</body>
</html>
Why this is happening. Do I need to create a fb API for successful login?
you must provide a valid url in order to work with the iframe method.
Anyway - you better use the xfmbl implementation of the like button
in order to do that you will have to open application (on http://developers.facebook.com/apps)
then paste this code after the <body> tag of your page (put the APP ID where it belongs)
<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=APP_ID_GOES_HERE";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
add this namespace to your html node:
<html xmlns:fb="http://ogp.me/ns/fb#">
and put this instead of the iframe you used
<fb:like send="false" href="YOUR_PAGE_ABSOLUTE_URL" width="450" show_faces="true"></fb:like>
for any further information you may refer here:
http://developers.facebook.com/docs/reference/plugins/like/
The accepted answer is wrong.
You'll get the same error the OP described no matter what implementation you use. The issue is due to a bug on Facebook's side of things.
It's currently OPEN, ASSIGNED, and set to HIGH priority. See here for more details: http://developers.facebook.com/bugs/228506407275556
Any assistance will and is greatly appreciated. Thank you in advance!
I used code generated by Facebook Developer and inserted the code into this WordPress site page:http://www.stilehair.com/studio code is below. When I open the page it looks right, BUT when I click on the "Like" button a pop-up appears and asks me to log into FB (even though I am already logged into FB.)
The box shakes and asks me again and never excepts my correct log in info, Nor does it except the "like".
This happens on all my browsers, iphone and ipad.
All software is up to date.
I've cleared the Cache'.
Tried numerous attempts at altering the code and/or method of inserting box.
Ran it through the FB Debugger
Searched the boards for answers and no solution is working.
<div id="fb-root"></div>
<script type="text/javascript">// <![CDATA[
(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-like-box" data-href="http://www.facebook.com/Stilehair"
data-width="292" data-colorscheme="dark" data-show-faces="false"
data-stream="false" data-header="false"></div>
I've researched several other questions with no results to help rectify my challenge.
Adding a like box seems like such an easy thing to do from all I've read on Facebook and Forums.
Thank you.
I used this code on my clients wordpress sites.
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<?php echo get_permalink(); ?>" show_faces="true" width="450" send="true"></fb:like>
the above code is working fine on all of my clients wordpress blogs. For example view any post page [link]
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.
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.