changeable subdomains facebook connect

蹲街弑〆低调 提交于 2019-12-12 04:12:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!