facebook chat widget "greeting_dialog_delay" hide not working

I’m trying to hide that annoying dialog chat from Facebook chat widget, but the hide attribute is not working.

  <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'));
  
  
  jQuery('head').append('<style>.fb_dialog, .welcomePageModalSheetContent {z-index: 12 !important;}</style>');
  </script>

  <!-- Your Chat Plugin code -->
  <div class="fb-customerchat" attribution="setup_tool" page_id="xxxxxx" theme_color="#0A7CFF" logged_in_greeting="Message" logged_out_greeting="Message" greeting_dialog_display="hide" minimized="true">  
  </div>";

I don’t know what’s going on, and I’ve already cleared my cache too many times.

Source: Ask Javascript Questions

LEAVE A COMMENT