diff --git a/lib/Facebook.js b/lib/Facebook.js index 3b534060f..709d6c494 100644 --- a/lib/Facebook.js +++ b/lib/Facebook.js @@ -251,7 +251,6 @@ function Facebookbot(configuration) { facebook_botkit.receiveMessage(bot, message); } else if (facebook_message.postback) { - // trigger BOTH a facebook_postback event // and a normal message received event. // this allows developers to receive postbacks as part of a conversation. @@ -261,6 +260,7 @@ function Facebookbot(configuration) { user: facebook_message.sender.id, channel: facebook_message.sender.id, timestamp: facebook_message.timestamp, + referral: facebook_message.postback.referral, }; facebook_botkit.trigger('facebook_postback', [bot, message]); @@ -271,6 +271,7 @@ function Facebookbot(configuration) { user: facebook_message.sender.id, channel: facebook_message.sender.id, timestamp: facebook_message.timestamp, + referral: facebook_message.postback.referral, type: 'facebook_postback', };