I am trying to use the Facebook Customer Chat plugin on our Wix website.
Here is the HTML code I am trying to run:
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '420354745006215',
xfbml : true,
version : 'v2.11'
});
};
(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 = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-customerchat" page_id="822021011234446" </div>
The code runs perfectly fine in the W3 Try Editor , but does not work on the Wix HTML code add-on.
When I enter the code in Wix HTML code add-on, and I load the our website, I get the error: "Refused to display ‘https://www.facebook.com/v2.11/plugins/customerchat.php?app_id=420354745006215&channel=https://...........&page_id=822021011234446&sdk=joey’ in a frame because an ancestor violates the following Content Security Policy directive: “frame-ancestors https://www.facebook.com”.
I also tried the code on the Wix HTML Tester but it still doesn’t work and doesn’t provide any error.
Kindly assist me with how can I get the Facebook Customer Chat Plugin to work on Wix.
Much thanks for your time and support.