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.

キャンバス フレームのソース コードは次のとおりです。

<!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
  • キャンバス コールバック URL: http://www.cuttingmasalachai.com/facebook
  • キャンバス URL:http://apps.facebook.com/cuttingmasalachai
  • への URL xd_receiver.html:http://www.cuttingmasalachai.com/facebook/xd_receiver.html
  • 接続 URL:http://www.cuttingmasalachai.com/facebook
  • ベース ドメイン:www.cuttingmasalachai.com

どんな助けにも感謝します。ありがとうございました。

4

4 に答える 4

1

xd_receiver.html の受け入れられるパスはブラウザーに依存し、Firefox はフル パスを受け入れますが、IE Opera と Safari は現在のページに対する相対パス ("xd_receiver.html" や ". ./xd_receiver.html" )。

Connect での URL とベースドメインの設定に関するあなたのヒントが私の一日を救ってくれたので、感謝しなければなりません :-)

ロベルト・チャオ

于 2009-08-09T15:34:24.413 に答える
0

私は非常によく似た問題を抱えていましたが、デフォルトでfbmlが有効になっていないことが原因であることが判明しました。代わりに、iframeアプリケーションはそうです。

アプリケーション設定でオンにしました(ラジオの選択肢はfbml / iframeです)。理由があることがわかりました。iframeの方が高速です。

とにかくiframeに関するドキュメントは少なくなり、Facebook接続についてのみ話しているページと混ざり合っています(同じではないにしても、多くの面で非常に似ています)

Fbmlドキュメントは今では最高のもののようです。(そして、fbmlアプリケーションは少ない労力で見栄えがします)

于 2009-10-25T02:34:40.933 に答える
-1

キャンバス コールバック URL ( http://www.baseurl/name/ )、www を含まないベース ドメイン (baseurl) などの connect 接続 url のアプリケーションの設定、およびこれは 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">

私のコードはすべて file にありますinvite_friends.tpl

于 2010-03-03T19:37:10.780 に答える