Hi,
I’m trying to set the Facebook Like Box, but I do not get it and is giving me the following error: “There was an error fetching the like box for the specified page.”
I already obtained the APP ID
I put the follow Javascript load code in the header file:
[PHP]<div id=”fb-root”></div>
<script>
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId : ‘293241480781860’, // App ID from the App Dashboard
channelUrl : ‘//www.locofortravel.com/channel.php’, // Channel File for x-domain communication
status : true, // check the login status upon init?
cookie : true, // set sessions cookies to allow your server to access the session?
xfbml : true // parse XFBML tags on this page?
});
// Additional initialization code such as adding Event Listeners goes here
};
// Load the SDK’s source 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>[/PHP]
created the file channel.php
[PHP]<?php
$cache_expire = 60*60*24*365;
header(“Pragma: public”);
header(“Cache-Control: maxage=”.$cache_expire);
header(‘Expires: ‘.gmdate(‘D, d M Y H:i:s’, time()+$cache_expire).’ GMT’);
?>
<script src=”//connect.facebook.net/en_US/all.js”></script>[/PHP]
…and put it in the root
Also placed in the app id in the “Facebook Like Box” module.
Can you see what I’m doing wrong?