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

optin not working with checkbox messanger plugin #1268

Closed
gilLionKing opened this issue Mar 2, 2018 · 5 comments
Closed

optin not working with checkbox messanger plugin #1268

gilLionKing opened this issue Mar 2, 2018 · 5 comments

Comments

@gilLionKing
Copy link

gilLionKing commented Mar 2, 2018

Hi im implementing the checkbox plugin on my website and when the user optsin im receiving the event
throught the bot kit
im using the below code to trigger the opt in taking the user_ref as the id which will be used to send a message
else if (facebook_message.optin ||
(facebook_message.postback && facebook_message.postback.payload === 'optin')) {
message = {
optin: facebook_message.optin,
user: facebook_message.optin.user_ref,
channel: facebook_message.optin.user_ref,
timestamp: facebook_message.timestamp
}
controller.trigger('facebook_optin', [botk, message])
}
but when i try to send a message with
controller.on('facebook_optin', function(botk, message) {
botk.reply(message, 'Welcome to my app!');
});
im getting debug: API ERROR { message: '(#100) No matching user found',
type: 'OAuthException',
code: 100,
error_subcode: 2018001,
fbtrace_id: 'DZBD+d9AsP4' }

what can i do to correct this ? its probably an issue with the reply not using the user_ref id

@imjul1an
Copy link
Contributor

@gilLionKing that's interesting, I'm also subscribing to facebook_optin, but not getting anything.

controller.trigger('facebook_optin', [botk, message]) - what this line means?

@peterswimm
Copy link
Contributor

Is this still a problem?

@imjul1an
Copy link
Contributor

@peterswimm yes. I still not getting events to my webhook.

@peterswimm
Copy link
Contributor

The primary thing to check is your developer portal settings, and if your developer environment is reaching the outside internet.

@imjul1an
Copy link
Contributor

imjul1an commented Jul 30, 2018

I'm running two apps. Two of them using localtunnel (Frontend and the bot). Subdomain for frontend is whitelisted, checkbox is visible on in the web app.

I can browse the web app and talk to the bot. But can't get webhook, don't really understand if it's FB or not. Maybe if you can point me to the code that I can debug on botkit side, I would be more then happy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants