How to imbed facebook messenger to xojo web page?

I am exploring to add facebook messenger to xojo web page. Facebook provided script as show below:

<!-- Load Facebook SDK for JavaScript -->
  <div id="fb-root"></div>
    window.fbAsyncInit = function() {
        xfbml            : true,
        version          : 'v8.0'

    (function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); = id;
    js.src = '';
    fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));</script>

  <!-- Your Chat Plugin code -->
  <div class="fb-customerchat"

How and where can I paste it?

@ronaldo_florendo, You can try the

WebHTMLViewer1.LoadHTML("<html><body>paste your code here</h1></body></html>")

method of loading code into a html viewer.

Looking at the FB code you will likely need to edit the page_id.

You have a few different solutions see

Kind regards, Andrew

1 Like

I believed there is no “LoadHTML” method within WebHTMLViewer1

WebHTMLViewer got a LoadHTML method in 2020r1


If using Xojo Web before 2020 R1 use HTMLViewer1.LoadPage instead of the newer HTMLViewer.LoadHTML (the example usage is the same).

If you are using a version prior to 2020 R1, you can view the HTMLViewer1.LoadPage documentation by setting ‘When seeking help’ = Use built-in documentation, in Xojo Preferences.