问题
The new version of site is not ready yet.Thats why we use a subdomain.To make the link more user friendly we made the links to be like userName.site.com
or at this point userName.dev.site.com
instead of dev.site.com/userName
main url
dev.site.com
some example urls
jack.dev.site.com
stefan.dev.site.com
If i try to login in with facebook at this url dev.site.com , everything is ok. But when i go to jack.dev.site.com im not logged in anymore if i try to loggin, facebook returns an error.Then if i go to dev.site.com i'm actually logged.
I try with
document.domain = "dev.site.com";
with no effect. Any ideas ?
回答1:
If I understand correctly you have 2 versions of your app, one is 'live' and one is 'beta'. Because these two versions reside in different sub-domains, you must create two apps on facebook. That is, the same app can't be hosted on two different subdomains.
来源:https://stackoverflow.com/questions/11672943/changeable-subdomains-facebook-connect