Tuesday, 11 April 2017

quickreplies coding for node-wit example messenger.js

I cannot get quickreplies to work in node-wit messenger.js example. I tried may things including: 1) Updated this line of code Our bot actions (messenger.js):

const actions = { send({sessionId}, {text,quickreplies})

2) And Updated this line of code Our bot actions (messenger.js):

return fbMessage(recipientId, text,quickreplies)

3) Updated my custom action in messenger.js :

getWelcome({context, entities})
 {
      context.welcome = "how are you. Please select from the options below"; 
    context.welcome.quickreplies = [
    { 
      title: 'Choice A',
      content_type: 'text',
      payload: 'empty'
    },
    { 
      title: 'Choice B',
      content_type: 'text',
      payload: 'empty'
    },
   ]

return context;
  }, 

4) I tried so many permutations. I cant get it to work with node-wit messenger.js example. The quick repliess are not displayed I searched and read all documentation

5) Can you help with this and also exactly how to retrieve the quick reply selected in messenger.js

Thanks



via Janet Voice

No comments:

Post a Comment