1

私は先週からこれに取り組もうとしてきましたが、私の人生では、サファリでこれを機能させることができないようです.Safariを除く他のすべてのブラウザはポップアップをレンダリングします.

javascript-sdk非同期でロードして開始し、FB.uiメソッド「stream.publish」で呼び出します。問題は、このコードがサファリで機能するはずであることを私は知っているということです。ここの例はhttp://fbrell.com/fb.ui/stream.shareです。

IE7 の問題を修正するために使用するこの P3P ヘッダーを使用しています。

Response.AddHeader("P3P", "CP=\"NON DSP COR DEVa PSAa IVAo CONo OUR IND UNI PUR NAV DEM LOC\", " + "policyref=\"http://sweepstakes.mars.com/w3c/p3p.xml\"");

誰かがこれを機能させる魔法のヒントを提供してくれることを願っています。これが私のコードです:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>test</title>
</head>
<body>
    <div id="fb-root">
    </div>
    <script>
        window.fbAsyncInit = function (){

            FB.init({ appId: '<%= Common.appID %>', status: true, cookie: true,
                xfbml: true
            });

            var publish = {
                method: 'stream.publish',
                message: 'test',
                display: 'dialog'
            };

            FB.ui(publish);
        };

        (function () {
            var e = document.createElement('script'); e.async = true;
            e.src = document.location.protocol +
            '//connect.facebook.net/en_US/all.js';
            document.getElementById('fb-root').appendChild(e);
        }());

    </script>
</body>
</html>
4

1 に答える 1

1

多くのテストとフラストレーションの後。同僚は、「feed」は「stream.publish」を行う新しい方法であると指摘しました。これで問題は解決しました。

編集:時代遅れの答え。

于 2011-02-04T18:05:11.950 に答える