我正在尝试创建一个Facebook应用程序,并通过了本书http://pragprog.com/titles/mmfacer/developing-facebook-platform-applications-with-rails。当我的画布渲染方法设置为fbml时,在我的开发机器上一切正常。但是,由于各种原因,我想用iframe构建一个应用程序。当我将应用程序设置为使用iframe时,我无法连接到我的开发计算机。我经历了许多关于创建iframe应用程序的不同文章,但似乎没有任何工作。这包括在轨道上的iframe的Facebook应用程序
http://wiki.developers.facebook.com/index.php/Cross_Domain_Communication_Channel
http://wiki.developers.facebook.com/index.php/XFBML
,发现谷歌搜索的脸谱,IFRAME,铁路和其他任何组合的任何其他网站。
我有我的公开目录中的文件xd_receiver.htm和我的布局看起来像
<!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>
我的问题是,我错过什么是防止从Facebook的连接到我的Rails开发机的时候我设置画布渲染方法到iframe?由于我的开发日志没有显示任何连接尝试,我猜测它与跨域的东西有关,但我无法在任何地方找到一个好的答案。
(我会发表评论,而不是一个答案,但我的成绩并不让我)。 – joshnesbitt 2009-06-13 22:26:42