views:

189

answers:

1

Previously, Google's Friend Connect required users to upload a couple of files to their websites to enable cross domain communication and Facebook Connect still requires you to upload a single file to enabled it.

Now, Friend Connect doesn't require any file upload... I was wondering how they were able to accomplish this.

Reference: http://www.techcrunch.com/2009/10/02/easy-does-it-google-friend-connect-one-ups-facebook-connects-install-wizard/

A: 

I'm not sure how it works in this particular instance but cross-domain messaging can be accomplished either by the postMessage() API or by changing the hash part of the URL and monitoring that.

The hash change method works because both the enclosing and the enclosed pages have access to the enclosed page's URL.

Of course, hopefully the postMessage() API call becomes more standard over time.

Anthony Mills