Facebook provides the following code to add their Messenger to my site:
<div id="fb-root"></div>
<script>
window . fbAsyncInit = function() {
FB.init({
xfbml : true,
version : 'v9.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>
<!-- Your Chat Plugin code -->
<div class="fb-customerchat"
attribution="setup_tool"
page_id="154431948680615"
logged_in_greeting=“Hello! How can we help you?”
logged_out_greeting=“Hello! How can we help you?”>
I placed this code starting in a new line after the “// Write your JavaScript here”
No matter where I place it it has the same result: It shows a red dot with message “Parsing error: Unexpected token <” while the first character of the code “<” has a red squiggly line underneath.
I do not know anything about coding. How can I fix this and get Messenger in my site?