Facebook Messenger customer chat plugin is not working

4.6k Views Asked by At

We have tried to integrate Facebook Customer Plugin to one of our websites. We followed the instructions in the developer documentation, but it‘s not working. At first we get this notifacation with provided url and when you click on it says that „The provided app ID does not look like a valid app ID“.

First notification:

enter image description here

Second notification:

enter image description here

We used this codes:

1) Facebook SDK

<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId            : '1983831301869331',
      autoLogAppEvents : true,
      xfbml            : true,
      version          : 'v3.2'
    });
  };

  (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>

2 ) Customer Chat Plugin

<!-- Load Facebook SDK for JavaScript -->
<div id="fb-root"></div>
<script>(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 customer chat code -->
<div class="fb-customerchat"
  attribution=setup_tool
  page_id="1983831301869331"
  theme_color="#c43627"
  logged_in_greeting="Sveiki! Kuo galime padëti?"
  logged_out_greeting="Sveiki! Kuo galime padëti?">
</div>
0

There are 0 best solutions below