jellyfangs/messenger-bot-tutorial

Retrieving user's input inside action.

thibaultboursier opened this issue · 5 comments

Hello,

I have an action called saveAddress.
Inside it, I call an API to save an address entered by Facebook user.
My problem is that I can't get user's input inside action function.

['saveAddress'](sessionId, context, cb) {
        saveAddress(context._fbid_, 'ADRESS ENTERED BY USER')
            .then(response => {
              context.success = response.success;

              cb(context);
            });
    },

I'm sure there's a way to achieve it.
Do you have a solution ?

Thank you.

Hi @thibaultboursier I really don't have an answer to this but I'm trying to implement something similar on nodejs and wondering if you've figured out yours and could help out. Thank you!!!

Hi @thekinglaolu I didn't solve this problem, because I switched for another messenger bot implementation, but I can help you if you want.

Please, I do want your help. I'll be most grateful. Plus, I actually switched from using a chat text bubble style to request for inputs to a webview form that gets the inputs and submits to a database. However, I've really not completely figured out how to implement the webview without a third party solution. Could you help me out?

Could you share your Github project with me, in order I can have a look ?

It's still a work in progress and it's kinda private for now(I'm just a chip off the team block) so it's not been pushed to Github yet.