This question has been asked before on other forums but dont see to be able to find an answer the works, so asking again incase anyone can help.
I have the facebook chat plugin on my website www.tiqy.com, which works fine with the following code. The part that doesnt work is "FB.Event.subscribe('customerchat.dialogHide',FB.CustomerChat.hide());". When someone closes the chat I want the whole chat icon to disappear. I have read and tried to follow the facebook documentation, but it doesnt seem to work.
window.fbAsyncInit = function () {
FB.init({
status: false,
cookie: false,
xfbml: false,
version: 'v6.0'
});
FB.Event.subscribe('customerchat.dialogHide',
FB.CustomerChat.hide());
};
(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>