-1

私のページには2つのFacebookプラグイン(コメントボックスなど)があります。プラグインでログインすると、ページを更新するまで別のプラグインに自動的にログインしません。

例:「いいね」ボタンをクリックしてログインすると、ページを更新するまでコメントボックスはログアウト状態のままになります。

その問題に良いことを教えてください

私のコードは次のとおりです

<script>
    window.fbAsyncInit = function () {



FB.init({ appId: 'My app ID', status: true, cookie: true, xfbml: true });


        FB.Event.subscribe("xfbml.render", function (targetUrl) {
            $("#myh1").html("Facebook Loaded");
            //alert('edge.create');
            setTimeout(aaa, 500);



        });

        FB.Canvas.setDoneLoading(function () {
            alert("Done loading");
        });



        FB.Event.subscribe('comment.remove', function (response) {
            alert('The status of the session is: ' + response.status);
        });
    };
    (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);
    } ());


    function aaa() {

        $("#content_1").mCustomScrollbar({
            scrollButtons: {
                enable: false
            }
        });
    }

</script>


<div class="fb-like" data-send="false"  data-href="http://www.facebook.com    /AiLiveCaptions"   data-width="298" data-show-faces="true">
        </div>

<div class="fb-comments" data-href="http://www.facebook.com/AiLiveCaptions" data-num-    posts="8" order_by="reverse_time" data-width="280"></div>
4

1 に答える 1

0

使用できます

FB.XFBML.parse();

その場でドキュメントに XFBML マークアップをレンダリングします。

FB ドキュメンテーション

于 2012-09-01T09:18:04.263 に答える