Facebook App on Subdomains: Site URL vs App Domains

前端 未结 3 928
花落未央
花落未央 2020-12-05 14:58

According to facebook and other stack overflow questions, subdomains are supported in the App Domain field, however in the Site URL field (under Website with Facebook Login)

相关标签:
3条回答
  • 2020-12-05 15:33

    Our Oauth login with wildcard subdomain had been working for the last few years but then suddenly stopped a couple of weeks back.

    After some trial and error I have found the following to work (at this time: sept 2017)

    • turn on ” Use Strict Mode for Redirect URIs”
    • leave “Valid OAuth redirect URIs” field blank

    I'm a bit concerned that this is not a very secure setup though :( I think it will work as a temporary solution while we figure out a better way to handle it.

    0 讨论(0)
  • 2020-12-05 15:36

    EDIT: Apparently this isn't working anymore (see comments bellow)

    I just started playing around with the fields, and I think I actually found out why it wasn't working.

    I must have originally left the app domain field blank, and just tried putting the domain into the Site URL field (http://example.com), which wouldn't work. Without putting in an app domain only the full url for Site URL (http://clientname.projectname.example.com) worked.

    Once I put mydomain.com into the App Domain field along with http://example.com in the SiteURL field it worked with subdomains. And I had assumed the app domain field was redundant...

    I guess this means I can delete the extra 20 apps I created :-)

    0 讨论(0)
  • 2020-12-05 15:46

    What worked for me was setting both the App Domains and Site URL with the site base domain (e.g. http://example.com). I could use the login in all of my subdomains.

    Also, check if all your subdomains are using the same App ID (this mistake stole me a few minutes of life more than once).

    0 讨论(0)
提交回复
热议问题