Custom callback URL and subdomains

74 views
Skip to first unread message

Teemu Ikonen

unread,
May 17, 2011, 3:45:16 AM5/17/11
to Twitter Anywhere Development
I'm confused how I'm supposed to use the custom callback parameter
with subdomains.

If I host page using @anywhere from subdomain (say http://customer.example.com/)
and define callback url to the configured master domain 'http://
example.com/twittercb' it doesn't work, pop-up never closes and the
cookie is not set.

...
<script src="http://platform.twitter.com/anywhere.js?id=MYAWKEY&v=1"
type="text/javascript"></script>
...
twttr.anywhere.config({ callbackURL: "http://example.com/
twittercb" });
twttr.anywhere(function (T) {
T("#twlogin").connectButton();
});
...

It seems that this is restricted by browser because of same origin
policy. Anywhere.js script loaded from callback url in the @anywhere
popup window can not access the parent Window.twttr object that was
loaded from customer.example.com.

Or have I misunderstood something? Is this even supposed to work?

Br Teemu
Reply all
Reply to author
Forward
0 new messages