x
Beta Member

Facebook Messenger Plugin

Has anyone found a workaround for adding the Facebook Messenger Plugin to our Square website? 

 

As we all probably know, the Square Messenger option is not great - It requires users to login to Facebook Messenger and has very limited features. 

 

Thank you!

748 Views
Message 1 of 4
Report
3 REPLIES 3
Super Seller

Hey @DoggFish 

 

From what I remember about this integration from using it on a website I programmed back in march, I'm pretty sure you could just head to https://square.online/app/website/users/134015847/sites/455169[Redacted]16/dashboard/site-settings/i... (this link may not work although I would hope it would simply redirect you) and click `+ Add New Code` you can then paste the code in and if it is the script tag which I think it is (would look like `<script>...</script>`) then you would simply add that to the body of every page.

 

If this helps then please do mark it as best answer to help others in the future!

Matt - He/They
Sign in and click Mark as Best Answer if my reply answers your question!
mjdws
Shop MJD Photography
Visit MJD Web Services
698 Views
Message 2 of 4
Report
Super Seller

I believe this is the integration you want to embed?

<!-- Messenger Chat plugin Code -->
    <div id="fb-root"></div>

    <!-- Your Chat plugin code -->
    <div id="fb-customer-chat" class="fb-customerchat">
    </div>

    <script>
      var page_id = page_id
      var chatbox = document.getElementById('fb-customer-chat');
      chatbox.setAttribute("page_id", "${page_id}");
      chatbox.setAttribute("attribution", "biz_inbox");
    </script>

    <!-- Your SDK code -->
    <script>
      window.fbAsyncInit = function() {
        FB.init({
          xfbml            : true,
          version          : 'v14.0'
        });
      };

      (function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src='https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));
    </script>
Matt - He/They
Sign in and click Mark as Best Answer if my reply answers your question!
mjdws
Shop MJD Photography
Visit MJD Web Services
698 Views
Message 3 of 4
Report
Beta Member

Thank you for the reply, Matt. Yeah, that is the code. I have tried to add it to that section with the "+ Add New Code", however, it gives me an error message that it isn't a script tag. I think this is because of the <Div> part of the coding?

 

Error is "Invalid HTML detected. Only <script> <noscript> <meta> are allowed as root HTML tags"

615 Views
Message 4 of 4
Report