41374

Question:
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?
There are two approaches:
<ol><li>Redirect all the traffics fromwww
to non-www
in .htaccess</li>
<li>Add the www
domain to App Domains
, in facebook app settings.</li>
</ol>See more: <a href="https://stackoverflow.com/questions/12050590/redirect-non-www-to-www-in-htaccess" rel="nofollow">Redirect non-www to www in .htaccess</a>, <a href="https://stackoverflow.com/questions/8574344/what-are-app-domains-in-facebook-apps" rel="nofollow">What are App Domains in Facebook Apps?</a>