1

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?

ricky
  • 1,644
  • 1
  • 13
  • 25
  • 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 Answers1

0

There are two approaches:

  1. Redirect all the traffics from www to non-www in .htaccess
  2. Add the www domain to App 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