What’s the correct/best approach to have multiple unrelated App Domains associated to a Facebook application?

送分小仙女□ 提交于 2019-12-23 03:22:33

问题


I have an application hosted on Azure and accessed through a web page. Authentication to the application is handled by signing in through Facebook. The application is not a Facebook canvas application, though it can share some activity to a user's Facebook stream.

I have two URLs to access my service; one http://projectgreenwich.cloudapp.net/ points to the site in the cloud (on Azure) while the other http://projectgreenwich.research.microsoft.com relies on DNS to give the application a more official looking URL. My problem is that in the Facebook application set-up (http://developers.facebook.com/apps/) I can only give one "App Domain" for the Facebook authentication to pass back to. I can fork from that domain, e.g. having projectgreenwich.cloudapp.net, projectgreenwichlocal.cloudapp.net, projectgreenwichtest.cloudapp.net, etc. But if I try to add a different domain (e.g. projectgreenwich.research.microsoft.com) I get an error when I save the Facebook app settings.

My solution has been to add http://projectgreenwich.research.microsoft.com as what Facebook term the "Mobile Web URL" for the app. This fixes my immediate problem (authentication on Facebook from http://projectgreenwich.research.microsoft.com works) but it leaves me uncomfortable about two things:

  1. It's a hack. The http://projectgreenwich.research.microsoft.com URL is no more a "Mobile Web URL" than the http://projectgreenwich.cloudapp.net/ is.
  2. If I add other DNS entries resolving to http://projectgreenwich.cloudapp.net/ there's no further place to add them.

There are a couple of related answers on Stack Overflow that suggest this is not possible and that Facebook’s blog-post to the contrary is misleadingly worded, but I’m hoping things have changed:

  • Zachary Kestenbaum's answer to ginja's question "Is it possible to configure a Facebook app to be used across multiple domains?" here: https://stackoverflow.com/a/7722584/575530
  • Ross' answer to Winaji's question "Facebook Connect for one application with multiple domains?" here: https://stackoverflow.com/a/4449914/575530

What’s the correct/best approach to have multiple unrelated App Domains associated to a Facebook application?

来源:https://stackoverflow.com/questions/9786201/what-s-the-correct-best-approach-to-have-multiple-unrelated-app-domains-associat

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