dancingbush
dancingbush

Reputation: 2281

Resource Error embedding FB Like Button

I am tryimg to embed teh Like/Share button in a webpage using the HTML and JS SDK source from the FB developer page but I getting the error in the following error in the web console:

Failed to load resource: The requested URL was not found on this server. file://connect.facebook.net/en_US/all.js#xfbml=1

Any input appreciated.

Ciaran

Code As Requested:

 <!--LOAD FACEBOOK JSSDK FOR LIKE ETC-->
<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 = "http://connect.facebook.net/en_US/all.js#xfbml=1&appId=113830492072210";
  fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));</script>

 <!--FACEBOOK LIKE-->
        <div class="fb-like" data-href="http://www.mooneycallans.com" data-send="false" data-layout="button_count" data-width="50" data-show-faces="false" data-colorscheme="dark" data-font="verdana"></div>

The ID i use is default provided from the FB page https://developers.facebook.com/docs/plugins/like-button/.

also works in JS Fiddle: http://jsfiddle.net/

After insertmg prefox http: before the src URL (now http:file://connect.facebook.net/en_US/all.js#xfbml=1) I still get the respurce error and :

Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings.  It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains

Confusing...

Upvotes: 0

Views: 340

Answers (2)

dancingbush
dancingbush

Reputation: 2281

Problem was i was testing from local host when the Facebook JS is trying to ref the website . By saving HTML file with script on to server and running from there it was fine.

Seems to be a frequently encountered problem.

Ta for input.

Upvotes: 1

Ragnar
Ragnar

Reputation: 1582

The error means the like/share button couldn't be found. Check to see if theirs any error in your link and check to see if the button still even exists on the server

Upvotes: 0

Related Questions