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

Re #552 - add support for referral param via postbacks (Facebook) #553

Merged
merged 1 commit into from
Dec 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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