Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.


  1. create a facebook app to get an appid
  2. use that appid in website to initialized the facebook javascript SDK
  3. use FB.ui to share content to facebook

full source codes

<!-- init facebook js sdk via your appid -->
  window.fbAsyncInit = function() {
      appId            : 'yourappid',
      autoLogAppEvents : true,
      xfbml            : true,
      version          : 'v3.1'
  (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'));
function share() {
    // use FB.ui() to share content to facebook
        method: 'share',
        href: 'urlyouwanttoshare',
      // callback
      function(response) {
        if (response && !response.error_message) {
          alert('Posting completed.');
        } else {
          alert('Error while posting.');

<button onclick="share()">share</button>


1.Go to your app in facebook developers page(Settings->Basic)
2.Scroll down and Click on Add platform, choose Web sites
3.Input your website domain
if you are testing via http://localhost:8080 then input http://localhost:8080
4.Save the changes

Then test again. you will find everything goes well.


App Domains is not working for web site share to facebook.
That might be used for mobile apps.