How to add multiple facebook callback urls

后端 未结 4 1027
情书的邮戳
情书的邮戳 2021-01-05 15:32

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)

N

相关标签:
4条回答
  • just add callback url you want to be redirected in 'Valid OAuth Redirect URIs' input and define the one you want to be redirected in your fbconfig page, in the 'FacebookRedirectLoginHelper()' class.

    Note: multiple url can be added in 'Valid OAuth Redirect URIs' input. You just need to choose the one you want to be used in the 'FacebookRedirectLoginHelper()' class.

    0 讨论(0)
  • 2021-01-05 16:22

    Answering my own question:

    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.

    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.

    0 讨论(0)
  • 2021-01-05 16:24

    Hi @Phantom007 how can add support for custom domains as well like example.com, my.com and many more with sub domain of somedomain.com

    0 讨论(0)
  • 2021-01-05 16:27

    You can add multiple callback URLs on the "Settings" -> "Advanced" screen. Scroll down to OAuth configuration, add the URLs and then save.

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