开发者

Facebook app redirecting to different subdomains

开发者 https://www.devze.com 2023-04-11 04:35 出处:网络
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 implemen

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开发者_Go百科://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 ?


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:

Enable auth on domain and subdomain(s) (e.g., "example.com" will enable *.example.com)


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消