views:

72

answers:

1

A customer site that I cannot change has the line 'document.domain = "site.com"; while the site is at www.site.com.

The effect is that FB connect window login gets stuck after submitting username+password.

Firebug shows its in infinite loop inside dispatchmessage function, which gives perpetual exception:

Error: Permission denied for <http://www.site.com&gt; to get propertyl Window.FB from <http://site.com&gt;

Any idea how to work around this? I prefer not to ask the customer to remove the document.domain='site.com'

+1  A: 

It seems like a really bad idea to tell the visitor's browser that the website is being served from a particular domain, when it in fact is not. The best solution would be to change that line. I take it you don't want to change it because they have some client-side code that depends on this?

One workaround would be to change the Facebook application's Connect URL to http://site.com, since Facebook's JavaScript will think that is where it is being executed.

Alex Kahn

related questions