4

我一直试图让这个应用程序在 Facebook 上运行,但除了

"Hi this is some sample text."
A box stroked in red.  "I am My photo " and a default silhoutte of a Facebook user
as the photo.

下面是canvas框架的源码:

<!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">
<head>

    <title>Cutting Masala Chai Invitation</title>
</head>
<body>

<script type="text/javascript"
    src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"></script>

Hi this is some sample text.

<fb:serverfbml style="border: 1px solid red; min-width: 700px;min-height: 400px">
    <script type="text/fbml">
        <fb:fbml>
            <fb:request-form 
                action="http://www.cuttingmasalachai.com/facebook" 
                method="POST" 
                invite="true" 
                type="Cutting Masala Chai" 
                content="&lt;fb:name uid=&quot;605869619&quot; firstnameonly=&quot;true&quot; shownetwork=&quot;false&quot; /&gt;wants to invite you share stories and vote for celebrities for the book Cutting Masala Chai,&lt;fb:req-choice url=&quot;http://apps.facebook.com/cuttingmasalachai&quot; label=&quot;Add Cutting Masala Chai&quot; /&gt;"> 
                <fb:multi-friend-selector 
                    max="20" 
                    actiontext="Invite your friends to Cutting Masala Chai." 
                    showborder="false" 
                    rows="5">
                </fb:multi-friend-selector>
            </fb:request-form>
        </fb:fbml>
    </script>

</fb:serverfbml>

I am <fb:name uid="605869619" firstnameonly="true" shownetwork="false"></fb:name>
My photo <fb:profile-pic uid="605869619"></fb:profile-pic>



<script type="text/javascript"> 
    FB_RequireFeatures(["XFBML"], function(){

        console.log('fb_requirefeatures function got called');
        FB.Facebook.init("0acf016613ca171e9665f128d318fd75", "/facebook/xd_receiver.html"); 
    });
</script>
</body>
</html>

应用程序设置:

  • 画布模式:IFRAME
  • 画布回调网址: http://www.cuttingmasalachai.com/facebook
  • 画布网址:http://apps.facebook.com/cuttingmasalachai
  • 网址xd_receiver.htmlhttp://www.cuttingmasalachai.com/facebook/xd_receiver.html
  • 连接网址:http://www.cuttingmasalachai.com/facebook
  • 基域:www.cuttingmasalachai.com

我会很感激任何帮助。谢谢你。

4

4 回答 4

4

其他几个人也面临同样的问题:

Facebook 论坛讨论这个问题。

问题在于我使用的连接 URL 和基本域以及一点点耐心。

在 Facebook 上将设置传播到服务器需要几分钟时间。在将连接 url 和基本域设置为这些之后,我只需要再等一下:

Connect URL: http://www.cuttingmasalachai.com/
Base Domain: cuttingmasalachai.com

希望对遇到此问题的任何人有所帮助。干杯。此外,来自论坛的 5 杯啤酒用于 adougherty 和 krisoye,用于发布问题并提供解决方案。

于 2009-07-17T11:35:49.370 回答
1

我在 wiki 上读到 xd_receiver.html 的接受路径取决于浏览器,而 Firefox 接受完整路径,而 IE Opera 和 Safari 需要相对于当前页面的路径(如“xd_receiver.html”或“. ./xd_receiver.html”)。

我必须感谢您,因为您在 Connect 中设置 URL 和 basedomain 的提示节省了我的时间 :-)

乔,罗伯托

于 2009-08-09T15:34:24.413 回答
0

我有一个非常相似的问题,结果是fbml 默认没有启用。相反,iframe 应用程序是。

我在我的应用程序设置中打开了它(有一个单选选项 fbml/iframe)并发现有一个原因:iframe 更快。

无论如何,关于 iframe 的文档越来越稀缺,并且与仅谈论 facebook connect 的页面混杂在一起(在许多方面,它非常相似,如果不相同,是的)

现在,Fbml 文档似乎是最好的文档。(而且 fbml 应用程序看起来不错,而且省力)

于 2009-10-25T02:34:40.933 回答
-1

连接连接 url 中的应用程序设置,例如您的 Canvas 回调 URL ( http://www.baseurl/name/ )、不带 www (baseurl) 的基本域以及 javascript 帮助中的这个。

<script type="text/javascript"> 
    FB_RequireFeatures(["XFBML"], function() {
        console.log('fb_requirefeatures function got called');
        FB.Facebook.init("you_application_id)", "invite_friends.tpl"); 
    });
</script>

将此添加到文件末尾

<fb:serverfbml style="border: 1px solid red; min-width: 700px;min-height: 400px">

我所有的代码都在文件中invite_friends.tpl

于 2010-03-03T19:37:10.780 回答