1
votes

I added a facebook like button in my page. The page is rendered by using AJAX. Here is my code:

$(document).ready(function(){
    (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 = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));

});

When I access this page via Chrome, Chrome keeps log the error message: Blocked a frame with origin "https://www.facebook.com" from accessing a frame with origin "site url" The frame requesting access set "document.domain" to "facebook.com", but the frame being accessed did not. Both must set "document.domain" to the same.

Thanks a lot for your help.

1

1 Answers

2
votes

I just found this on the facebook developer site: "This is a warning in Chrome that has no ill side effects Please check whether you have any extensions installed."

http://developers.facebook.com/bugs/586120791417551/

It may be that you have a content script from an extension that is generating these errors. My site is slo showing several of these errors in the console log. However, the facebook button is operating correctly. I am going to test in a chrome session with no extensions installed.

Is your facebook like button functioning correctly (other than throwing messy console errors)?