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)
Now, I want to offer a feature so that my customers can enable "Login with facebook" feature into their subdomain.
Since facebook requires us to add a list of URLs under "Client OAuth Settings" > "Valid OAuth redirect URIs"
Click for Screenshot
What can I do so that it allows my product's subdomain (eg http://xyz.somedomain.com) or customer domains (eg: example.com)
Thanks
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With