Facebookは何か本当にクールなものを立ち上げました。ユーザーがクリックしてオプトインするとページをリダイレクトする方法を見つけようとしています。今、私は真剣にJavaで良いことではない、PHPは私のことです。Facebook Send-To-Messengerイベントリスナー
REFERENCE:https://developers.facebook.com/docs/messenger-platform/plugin-reference/send-to-messenger#event
ワーキングコード:はconsole.logを追い出すとリダイレクトが、ユーザーがボタンをクリックして起動したとき、私がやりたいことは何かをされます
FB.Event.subscribe('send_to_messenger', function(e) {
// callback for events triggered by the plugin
console.log('inside the send_to_messenger');
window.top.location = 'http://google.com';
});
send_to_messenerボタンを使用してオプトインします。
だから私も---
FB.Event.subscribe('send_to_messenger', function(e) {
FB.Event.subscribe('clicked', function(e) {
// callback for events triggered by the plugin
console.log('user clicked button');
window.top.location = 'http://google.com';
}});
は再び、何も働いていない---
FB.Event.subscribe('clicked', function(e) {
// callback for events triggered by the plugin
console.log('user clicked button');
window.top.location = 'http://google.com';
});
を試してみました - 誰かが正しい方向にポイントすることができ手掛かりを持っている場合、私はそれをいただければ幸いです..ありがとう!
'。 – Flimm