UPDATE: So this is big. If you try to link to any facebook page with a like button it doesn't work. Try going to the Facebook like creation page (http://developers.facebook.com/docs/reference/plugins/like/) and entering the URL of any facebook like page (like Stackoverflow's: http://www.facebook.com/stackoverflowpage).
This code was working fine until earlier today and now I'm completely lost as to why it has stopped working. The like button loads, but you can't like it or send a message with it and the like count is 0 (it should be around 350).
Here is the jsfiddle. It's very simple: http://jsfiddle.net/rqR6C/
Every so often and ONLY in Google Chrome's console, I get an error. I've found a few other people experiencing this same error message who also say that it's intermittent. Here's the error:
The frame requesting access set 'document.domain' to 'facebook.com', but the frame being accessed did not. Both must set 'document.domain' to the same value to allow access.
The code:
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
// Init the SDK upon load
window.fbAsyncInit = function() {
FB.init({
appId : '464723870207650', // App ID
channelUrl : '//'+window.location.hostname+'/channel.php', // Path to your Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
frictionlessRequests: true
});
}
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
<div class="fb-like" data-href="http://facebook.com/pages/Grouptonescom/160798537354204" data-send="true" data-layout="button_count" data-width="180" data-show-faces="false"></div>
fb-root
div? Are there any error messages in your browser's console? – Neona