Facebook コメント モジュール/プラグインを Web ページにインストールすることを計画しています。
ユーザーをサイト内の別のランディング ページにリダイレクトすることはできますか? クリックしてコメントを投稿した後、ここに送信したいとしましょう。
http://www.example.com/landing-page/
これは、Facebook API または別のスクリプトで可能ですか?
Facebook コメント モジュール/プラグインを Web ページにインストールすることを計画しています。
ユーザーをサイト内の別のランディング ページにリダイレクトすることはできますか? クリックしてコメントを投稿した後、ここに送信したいとしましょう。
http://www.example.com/landing-page/
これは、Facebook API または別のスクリプトで可能ですか?
次のように、ユーザーがコメントを追加したときに発生する 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>