1

Facebook コメント モジュール/プラグインを Web ページにインストールすることを計画しています。

http://www.example.com/

ユーザーをサイト内の別のランディング ページにリダイレクトすることはできますか? クリックしてコメントを投稿した後、ここに送信したいとしましょう。

http://www.example.com/landing-page/

これは、Facebook API または別のスクリプトで可能ですか?

4

1 に答える 1

0

次のように、ユーザーがコメントを追加したときに発生する comment.create イベントを購読できます。

初期化

<div id="fb-root"></div>
<script>
    window.fbAsyncInit = function() {
FB.init({
    appId  : 'sensored-app-id',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml  : true  // parse XFBML
});

/* All the events registered */
FB.Event.subscribe('comment.create', function (response) {
    // Redirect to http://www.example.com/landing-page/
    window.location = "http://www.example.com/landing-page/";
});



};

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

そして、あなたのfbコメントでは、notify="true"をそのように設定する必要があります

<fb:comments numposts="10" notify="true"></fb:comments>
于 2012-10-09T20:00:50.227 に答える