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

Commit

Permalink
Re #552 - add support for referral param via postbacks (Facebook)
Browse files Browse the repository at this point in the history
  • Loading branch information
johngriffin committed Dec 13, 2016
1 parent bf2a10e commit 4d6e4bb
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 4d6e4bb

Please sign in to comment.