I'm attempting to create a facebook app and went through the book http://pragprog.com/titles/mmfacer/developing-facebook-platform-applications-with-rails. Everything works fine on my development machine when I have my canvas render method set as fbml. But, for various reasons I want to build an app with an iframe. When I set my app to use an iframe I am unable to connect to my development machine. I went through a lot of different articles about creating an iframe app, but none seem to work. That includes
http://wiki.developers.facebook.com/index.php/Cross_Domain_Communication_Channel
http://wiki.developers.facebook.com/index.php/XFBML
and any other site found googling any combination of facebook, iframe, rails and others.
I have the xd_receiver.htm file in my public directory and my layout looks like
<!doctype html public “-//w3c//dtd xhtml 1.0 strict//en” “http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xmlns:fb=”http://www.facebook.com/2008/fbml”>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title><%= controller.controller_name %>: <%= controller.action_name %></title>
<%= stylesheet_link_tag "jquery-ui-1.7.1.custom.css", "styles" %>
<%= javascript_include_tag "jquery-1.3.2.min.js", "application" %>
</head>
<body>
<%= yield %>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
FB_RequireFeatures(["XFBML"], function(){
FB.Facebook.init("my api key", "xd_receiver.htm"); });
</script>
</body>
</html>
My question is, what am I missing that is preventing facebook from connecting to my rails development machine when I set the canvas render method to iframe? Since my development log does not show any attempts of a connection, I'm guessing that it has something to do with the cross domain stuff, but I can't find a good answer about it anywhere.