Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #553 from johngriffin/master
Browse files Browse the repository at this point in the history
Re #552 - add support for referral param via postbacks (Facebook)
  • Loading branch information
Ben Brown authored Dec 19, 2016
2 parents 73542a0 + 4d6e4bb commit faf08f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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]);
Expand All @@ -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',
};

Expand Down

0 comments on commit faf08f2

Please sign in to comment.