Created
February 17, 2023 20:28
-
-
Save rolandfarkasCOM/60e7e810fefbe61272c0da988ef41b46 to your computer and use it in GitHub Desktop.
Replace {INSERTPAGEIDHERE} with your FB page id.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var chatbox = document.getElementById('fb-customer-chat'); | |
chatbox.setAttribute("page_id", "{INSERTPAGEIDHERE}"); | |
chatbox.setAttribute("attribution", "biz_inbox"); | |
</script> | |
<!-- Your SDK code --> | |
<script> | |
window.fbAsyncInit = function() { | |
FB.init({ | |
xfbml : true, | |
version : 'v15.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_GB/sdk/xfbml.customerchat.js'; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'facebook-jssdk')); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment