I have a link on my page and the links has the href set by this $facebook->getLoginUrl(); when I click on the link and go to facebook I get this error: An
$facebook->getLoginUrl();
An
The problem was caused because I had other url set on facebook for the site that the one that I was trying to login.
Just an addition to this question - This could also happen if your app is accidentally left in "Sandbox Mode".