Issues in Implementing Facebook Share API on my web application

I’m currently trying to figure how I can implement the Facebook Share API on my application. I have been getting errors even though I have implemented it correctly. Here is so far what I’ve done. I have copied the following code below from the Facebook Application that I have just created and placed it on the Web Application that I’m currently building.

  window.fbAsyncInit = function() {
      appId      : 'APP ID',
      xfbml      : true,
      version    : 'v2.9'

  (function(d, s, id){
     var js, fjs = d.getElementsByTagName(s)[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement(s); = id;
     js.src = "//";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));

  $('#facebook').on('click', function() {

      // FB.ui({
      //   method: 'feed',
      //   link: 'http://localhost/es/',
      //   caption: 'An example caption',
      // }, function(response){});

        method: 'share',
        display: 'popup',
        quote: 'test',
        href: ''
      }, function(response){});

I tried testing it and right now I got this error.

enter image description here

This is the web application that I’m currently developing and is running on Python/Angular.

I made a separate page on my localhost using XAMPP and also using the same Facebook Code for testing. And to my surprise it works.

enter image description here

If you look at the settings on my Facebook Application. I did not have to add the url in App Domains and also Site URL in order for it work (Look at the second image). I tried placing the IP address of my Web App but it won’t allow it. I even disabled the pop-up blocker that is installed on my browser

enter image description here

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.