My website's user management is totally done via facebook login. And I've specified the site URL as sitename.com
inside the Facebook app. However, when the site is visited with www
infront as www.sitename.com
, the facebook API fails to work. But if I change the site URL inside the Facebook app to www.sitename.com
, it works perfectly. Is there a way to solve this?
Asked
Active
Viewed 85 times
1

ricky
- 1,644
- 1
- 13
- 25

Yujith Perera
- 19
- 1
-
Please go read [ask]. Before we can suggest anything to fix the issue, we would first of all need to know what “fails to work” _actually_ means. – CBroe Dec 13 '17 at 09:31
1 Answers
0
There are two approaches:
- Redirect all the traffics from
www
tonon-www
in .htaccess - Add the
www
domain toApp Domains
, in facebook app settings.
See more: Redirect non-www to www in .htaccess, What are App Domains in Facebook Apps?

Ben
- 5,069
- 4
- 18
- 26