A workaround to prevent Facebook cross-error "Like"?

I have been working on this specific error for a week, debugging various social buttons and narrowing it down to Facebook in general: every Like button (HTML5, xfbml, etc.) launches the same cross-domain scripting error. Basically, Facebook launches this error with every iFrame (like below) when you click "like":

Unsafe JavaScript attempt to access frame with URL http://mediacdn.disqus.com/1326940420/build/system/def.html#xdm_e=http%3A%2F%2Fwww.vancitybuzz.com&xdm_c=default4311&xdm_p=1& from frame with URL http://www.facebook.com/plugins/like.php?channel_url=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df31a0247d%26origin%3Dhttp%253A%252F%252Fwww.vancitybuzz.com%252Ff3c0eb7e0c%26relation%3Dparent.parent%26transport%3Dpostmessage&extended_social_context=false&href=http%3A%2F%2Fwww.vancitybuzz.com%2F2012%2F01%2Fchinese-new-year-events-2012-vancouver-richmond-burnaby%2F&layout=box_count&locale=en_US&node_type=link&sdk=joey&send=false&show_faces=false&width=90. Domains, protocols and ports must match. 

Why this is not a duplicate: the problem occurs even in the absence of the Twitter button and google +. this also happens in every implementation of the like button. symptoms indicate a new problem.

Attempted Methods: I tried several "versions" of the Favorites button with the same problem. This is even contrary to DISQUS.

Suspects: Pages that do not have any DISQUS code are working properly. This variable (output from the wordpress plugin for DISQUS) is suspicious:

 var facebookXdReceiverPath = 'http://www.vancitybuzz.com/wp-content/plugins/disqus-comment-system/xd_receiver.htm'; 

In addition, JavaScript output is also suspicious.

See for yourself: Go to http://www.vancitybuzz.com/2012/01/research-in-motion-ceos-resign/ , but this can change.

Question

Given the information here, does anyone know of a workaround to supplant the cross-domain error? Thank you very much.

+4
source share
1 answer

After several people learned this, including me, there is currently no workaround for cross-domain errors, as Facebook uses iFrames for communication.

This also applies to the Google Plus button that exists today.

However, the future looks bright. Google developers (and probably Facebook too) have confirmed that they are working on a new solution.

Meanwhile, some people have reported that using Facebook and other widget plugins seems to alleviate the problem on Wordpress-structured sites. There is no guarantee.

http://mashable.com/2010/05/07/wordpress-facebook-like-buttons/

Future: I would not be surprised if websockets (and flash ws fallbacks) are used, but I will leave it on the devs platform

+2
source

Source: https://habr.com/ru/post/1392587/


All Articles