1

I have Facebook Like, Google +1, and Tweet buttons on my web page (https://www.coinek.com). Each uses a simple implementation recommended by Facebook / Google / Twitter. Functionally the buttons work as expected however whenever I click the Facebook Like button, I get a bunch of javascript errors in my console such as the following:

Blocked a frame with origin "https://www.facebook.com" from accessing a frame with origin "https://apis.google.com". 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 value to allow access.

Why would the Facebook iframe try to access the Google iframe? Am I doing something wrong here or are these errors something I should just learn to live with?

Nir Alfasi
  • 53,191
  • 11
  • 86
  • 129
Zeeb
  • 39
  • 5
  • Which line triggers the error, show us code! – Nir Alfasi Jul 04 '13 at 17:56
  • The console points at the following line of code as being the culprit. Please note that this is part of the all.js code from the Facebook library and not part of my own code: __d("ArbiterFrame",[],function(a,b,c,d,e,f){var g={inform:function(h,i,j){var k=parent.frames,l=k.length,m;i.crossFrame=true;for(var n=0;n – Zeeb Jul 04 '13 at 20:52
  • 1
    look at the code that you posted - does it look like something you'd want to read ? if you seek help from other people do the minimum: state the problem (which you did), post the relevant code, if there's an error let us know which line triggers it, and why you're stuck - what did you find when you googled the issue etc. Help us help you! – Nir Alfasi Jul 04 '13 at 22:00
  • Nope, it does not at all. My guess is that Facebook doesn't really care for people wanting to reverse engineer their code. This is the line of code that Chrome console reports as the one that is triggering the problem. It is part of the https:////connect.facebook.net/en_US/all.js library that we cannot modify (since it needs to be loaded from Facebook at run-time by the browser). So my guess is that this error either triggers for everyone who uses the Facebook Like button and other iFrame buttons on the same page, or that it is specific to my page layout. – Zeeb Jul 05 '13 at 03:28
  • I could send you code for my web page, however I have no idea which part of it could possibly causing the error, which is why I provided the link to my website. A right-click Inspect Element in Chrome will reveal the entire code for the page and I am sure that for someone who has come across this problem before, it would be easy to find. For someone who hasn't, I am afraid that they'd be at as much of a loss as I am. I did not intend for anyone to be troubleshooting javascript code since it's Facebook proprietary but rather to simply explain why this is happening and if it is normal. – Zeeb Jul 05 '13 at 03:35
  • try this: http://stackoverflow.com/a/16593474/1057429 – Nir Alfasi Jul 05 '13 at 07:28
  • Thank you. Unfortunately this is for a different problem. I have experienced it as well (aren't I lucky!) and resolved it earlier. – Zeeb Jul 05 '13 at 08:31
  • what you have on your website is only a warning - not an error! – Nir Alfasi Jul 05 '13 at 17:21
  • The warning you see when you first connect (FB.getLoginStatus() called before calling FB.init()) has already been resolved in my dev environment. The errors appear as soon as you click the Facebook Like button. In fact, several of those come up all at once. Also, clicking the Google +1 button produced the same error, although this one references code in the Google javascript. LOL I'm not trying to get a free Like but you do need to click it to see the error - you can unlike the site after you've seen it :) – Zeeb Jul 05 '13 at 23:23

0 Answers0