开发者

Twitter Oauth callback to www subdomain within same domain

I'm using ASP.NET MVC 3 and TweetSharp. I'm open authorization dialog with window.open(), at the end of auth program in this wind开发者_如何学Cow tries to access to main window through window.opener.

In my application callback set to http://www.domain.com and when i'm open site from that url everything works fine, but if use just domain.com i get an error something like "Acces is denided because of different domains" when window.opener is accessed.

I have tried to set callbackUrl when app auth dialog opens, but this has no effect. Also changing callback url to http://domain.com give same result.

Only way to solve this is to use UrlRewrite to always redirect on www.domain.com. Or i'm missing something and there is another way?

Thanks.


Log in to your Twitter Dev Account (dev.twitter.com), select the appropriate Twitter Application, go to the tab "@Anywhere domains" and add www.domain.com as authorized...

works for me


i did not work with tweeter but i work with facebook the same problem are there that is why i put the canvas url there with my domain url try to put your call back url as your domain url

or try some thing like this in java script :

 var url = window.location;
url = url.toString();
url = url.replace(/www.domain.com/,"domain.dev.domain.com")
window.location = url;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜