Facebook 应用程序重定向到不同的子域
我们正在将 Facebook 整合到我们的平台中;我们为不同的客户提供服务,每个客户都有不同的访问 URL:http://customer1.example.com; http://customer2.example.com 等等。我们正在实施 OAuth 2.0,以便客户能够从应用程序内执行某些 Facebook 操作。
从文档的外观来看(https://developers.facebook.com/docs/authentication/),看来我们需要每个客户一个 Facebook 应用程序,才能使授权流程正常工作。有没有办法指定“通配符”站点 URL,例如:http://*.example.com ?
We're integrating facebook in our platform; we serve different customers and each one has a different access URL: http://customer1.example.com; http://customer2.example.com and so on. We're implementing OAuth 2.0 so customers are able to perform certain facebook actions from within the app.
From the looks of the documentation (https://developers.facebook.com/docs/authentication/), it seems that we'll need one facebook app per customer, to make the authorization flow work. Is there a way to specify a "wildcard" Site URL, let's say: http://*.example.com ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
更新 2014 年 3 月 19 日 - 有人抱怨此功能已被禁用。
Facebook 设置页面中应用程序域设置旁边的工具提示文本明确指出这是可能的:
UPDATE 3/19/2014 - there have been complaints that this functionality has been disabled.
The tooltip text next to the App Domains setting in the facebook settings page explicitly states that this is possible:
不,您需要一个固定的 URL。如果你想隔离客户,那么我会放置一个可以正确重定向用户的回调 URL。
因此,您的回调 URL 为“http://callback.example.com”。该应用程序位于callback.example.com,查找已登录的客户并将其重定向到适当的URL。
No. You need a fixed URL. If you want to segregate the customers, then I would put a callback URL which can redirect the user correctly.
So, you have the callback URL as "http://callback.example.com". The app at callback.example.com, looks up the customer who is logged in and redirects them to the appropriate URL.