The Facebook Connect cross-domain receiver URL (http://SITENAME.com/index.php?opt ... .535%22%7D) must have the application's Connect URL (http://www.SITENAME.com/) as a prefix. You can configure the Connect URL in the Application Settings Editor.
This happens when you set the callback URL to use www and the site responds to the non-www version of the site (or vice versa).
You must set up your site to redirect the root of your domain to the callback you specify in your Callback URL. This is not only necessary for FB Connect, but also great for SEO purposes.
There are many ways to do this within different SEO components or the .htaccess file itself. In either case, it's important that you test your site both with and without www to ensure it functions properly:
SH404
- In the Configuration panel, go to the "Advanced" tab.
- Ensure the setting "301 redirect www/non-www" is set to Yes
.htaccess
The below code snippet comes from this page about half-way down in the section "301 Redirect Using Mod_Rewrite". Add the following line to your .htaccess file. Some/all of these lines may already be in there, so search to see if they are there first:
- Code: Select all
RewriteEngine On
rewritecond %{http_host} ^yoursite.com
rewriteRule ^(.*) http://www.yoursite.com/$1 [R=301,L]
