如何添加多个Facebook回调网址 [英] How to add multiple facebook callback urls

查看:189
本文介绍了如何添加多个Facebook回调网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个产品(例如:somedomain.com),人们可以在其中创建自己的子域(例如 http:// xyz。 somedomain.com ),甚至可以将他们的域映射到它(例如:example.com)

I have a product (eg: somedomain.com) where people can create their own subdomains (eg http://xyz.somedomain.com) or even map their domains to it (eg: example.com)

现在,我想提供一个功能,以便我的客户可以启用使用Facebook登录功能到其子域。

Now, I want to offer a feature so that my customers can enable "Login with facebook" feature into their subdomain.

由于Facebook要求我们在客户端OAuth设置>有效的OAuth重定向URI下添加一个URL列表

Since facebook requires us to add a list of URLs under "Client OAuth Settings" > "Valid OAuth redirect URIs"

点击屏幕截图

我可以做什么,以便它允许我的产品的子域名(例如 http://xyz.somedomain.com )或客户域(例如:example.com)

What can I do so that it allows my product's subdomain (eg http://xyz.somedomain.com) or customer domains (eg: example.com)

谢谢

推荐答案

回答我自己的问题:

如果你想要哟ur FB应用程序支持通配符子域(例如http://*.yourdomain.com),那么您应该在应用程序中将有效的OAuth重定向URI字段留空。但请确保您的App Domain字段设置为yourdomain.com,而您的站点URL字段设置为 http:// yourdomain.com

If you want your FB app to support wildcard subdomains (for eg http://*.yourdomain.com) then you should leave the "Valid OAuth redirect URIs" field empty in your app. But make sure your "App Domain" field is set to "yourdomain.com" and your "Site URL" field is to "http://yourdomain.com"

我很难想出这个事情,最终在一周的研究之后成功。希望这将有助于同样问题的人们奋斗。

I had a hard time figuring this thing out and finally succeeded after a week of research. Hope this will be helpful for people struggling with the same problem.

奖金提示:
如果您的FB应用程序没有允许将有效的OAuth重定向URI字段留空,尝试创建一个新的应用程序。当您创建一个新的fb应用程序时,默认情况下会将该字段设置为空。所以请保持原样,你应该很好。

Bonus tip: In case if your FB app doesn't allow to leave the "Valid OAuth redirect URIs" field empty, try to create a new app. When you create a new fb app, it will set the field empty by default. So leave it as is and you should be fine.

这篇关于如何添加多个Facebook回调网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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