可变子域 facebook 连接 [英] changeable subdomains facebook connect

查看:45
本文介绍了可变子域 facebook 连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网站的新版本尚未准备好.这就是我们使用子域的原因.为了使链接更加用户友好,我们将链接设置为类似于 userName.site.com 或此时userName.dev.site.com 而不是 dev.site.com/userName

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

主网址

dev.site.com

dev.site.com

一些示例网址

jack.dev.site.com

jack.dev.site.com

stefan.dev.site.com

stefan.dev.site.com

如果我尝试在此网址 dev.site.com 上使用 facebook 登录,则一切正常.但是当我去 jack.dev.site.com 时,如果我尝试登录,我将不再登录,Facebook 会返回一个错误.然后如果我去 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.

我试试

document.domain = "dev.site.com"; 

没有效果.有什么想法吗?

with no effect. Any ideas ?

推荐答案

如果我理解正确,您的应用程序有 2 个版本,一个是实时"版本,一个是测试版".由于这两个版本位于不同的子域中,因此您必须在 facebook 上创建两个应用程序.也就是说,同一应用不能托管在两个不同的子域上.

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.

这篇关于可变子域 facebook 连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆