According to the documentation in http://developers.facebook.com/docs/reference/javascript/fb.init/ the correct solution is to create a file on your web server (for example channel.html ) containing only:
<script src="http://connect.facebook.net/en_US/all.js"></script>
And then specifying the absolute URL of your channel.html in your init parameters:
<div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({ appId : 'YOUR APP ID', channelUrl : 'http://example.com/channel.html' </script>
For ease of deployment, I use the following to calculate my channelUrl.
var curLoc = window.location; curLoc.protocol + "//" + curLoc.hostname + ":" + curLoc.port + "/channel.html"
Duckmaestro
source share