DEV Community

Discussion on: RASA - Socket.IO integration

 
socr102 profile image
Eric

hello friend
I have a question about the Rasa Bot.
I want to use an IFrame when deploying my Rasa Bot to Facebook.
when click on the URL. Go to a new Chrome tab.
How to solve it?
I am asking for help individually
thank you
best

Thread Thread
 
petr7555 profile image
Petr Janik • Edited

Hi Elina,
I am sorry, I do not understand what your use case is.
Are you trying to embed Facebook page in an iframe or do you want the chatbot to send an iframe instead of a text?

Thread Thread
 
socr102 profile image
Eric

In my facebook messenger, there are things like this:

dev-to-uploads.s3.amazonaws.com/up...

when I click it:
dev-to-uploads.s3.amazonaws.com/up...

I want make the multiwebform as ifrme in the facebook messenger

that's all

thank you
best

Thread Thread
 
petr7555 profile image
Petr Janik • Edited

You can use Messenger Webview.
It can be opened either by clicking on a button (see URL button) or by clicking on a template (see Generic Template).
The Webview can be either compact, tall or full. This has effect only on mobile. On desktop, the website will always open in a new tab.

Example:

responses:
  utter_greet:
    - text: ""
      elements:
        - title: Welcome!
          image_url: https://avatars.githubusercontent.com/u/21214473?s=200&v=4
          subtitle: Rasa is an open source machine learning framework.
          default_action:
            type: web_url
            url: https://github.com/RasaHQ/rasa
            webview_height_ratio: tall
          buttons:
            - title: Compact
              type: web_url
              url: https://github.com/RasaHQ/rasa
              webview_height_ratio: compact           
            - title: Tall
              type: web_url
              url: https://github.com/RasaHQ/rasa
              webview_height_ratio: tall            
            - title: Full
              type: web_url
              url: https://github.com/RasaHQ/rasa
              webview_height_ratio: full
Enter fullscreen mode Exit fullscreen mode

Which results in:
Facebook template

After clicking on Tall button on mobile:
Tall Webview

I wish you a lot of luck with your project, Elina! 🍀

Thread Thread
 
socr102 profile image
Eric

Thank you for your help
and you mean that it appears in the new tab in case of desktop?

Thread Thread
 
petr7555 profile image
Petr Janik

Yes, in a new tab.

Thread Thread
 
socr102 profile image
Eric

But I saw the iframe in the desktop when I used the facebook messenger

Thread Thread
 
petr7555 profile image
Petr Janik

I could only find websites mentioning that you can embed Facebook Messenger into your website, not vice versa – add website as iframe into Facebook Messenger.

Thread Thread
 
socr102 profile image
Eric
Thread Thread
 
petr7555 profile image
Petr Janik

I have tried clicking the button in a Messenger application (i.e. facebook.com/messages/), but it still opens in a new tab.

Unfortunately, I do not how to achive something similar to the last picture you sent.

Thread Thread
 
socr102 profile image
Eric

I solved it
thank you for your kindness
I think we can work in rasa project
what do you think about this
thank you
best

Thread Thread
 
petr7555 profile image
Petr Janik

That's great! Would you mind sharing a bit about how you solved it?

Thread Thread
 
socr102 profile image
Eric

Could you send me your mail ?
I can contact using that
thank you

Thread Thread
 
petr7555 profile image
Petr Janik

I think writing it here in the comments could benefit others who are reading this thread. Is it fine with you to send your solution publicly?

Thread Thread
 
socr102 profile image
Eric

I want to know about you a lot

ok I will publish it as soon as my project is finished

It needs some time to pulish the method