"@botpress/channel-messenger" and webviews


#1

Hello,

I’m using botpress together with the “@botpress/channel-messenger” module and would like to use webviews for a better user experience.
However, I’m struggling with the usage of webviews in botpress.

The documentation in the following link states that “by using our module, you can send anything you want to your users on Messenger. In fact, this module support all types of messages that are available on Facebook (text, images, videos, audios, webviews…).”…but that’s the only part where webviews are mentioned.

Is it possible to use webviews with channel-messenger and if so, where can I read more about this topic?

Best regards


#2

That’s wrong repository to look into.
Check web-extensions chapter at https://github.com/botpress/botpress/tree/archive/10.x/packages/channels/botpress-channel-messenger


#4

Okay, I figured it out. I thought it’s also possible to show the webview within the messenger instead of opening a dialog.

My renderer looks like this

// ...
  return [{
    on: 'facebook',
    template_type: 'generic',
    elements: [{
      title: 'Link Title',
      buttons: [{
        type: 'web_url',
        title: 'Button Title',
        url: 'https://www.url.org',
        messenger_extensions: true,  
        webview_height_ratio: 'full'
      }]
    }],
    typing: data.typing
  },
// ...

#5

Hi, @iZEY could you please elaborate on your answer. I am working to send templated data in messenger. FB List Template.

I am supposed to send templated data to FB messenger from bot using actions.js. Here is the question i asked on the forum, I think I have to create a custom renderer like you. Or if there is any other way around to get this done? thanks in advance for the help.