Facebook Developer continuously provides it’s greatest feature. Now-a-days the most sexy feature of facebook developer is facebook connect, anybody can use facebook connect on his site by which visitor can access few protected areas of his site using facebook login.
Popular websites like Mashable, Digg, CNN etc already implemented this feature. There is nice tutorial http://wiki.developers.facebook.com/index.php/Facebook_Connect_Tutorial1, by following this you can easily implement this feature on your site in five-ten minutes. But i faced a problem that is, when i click on connect button, sign in window comes, when i put correct info – it’s logged in successfully but the sign popup box doesn’t go away, instead my web site comes on the popup box. Finally i found my problem. See the code below:
The second parameter is the filename provided by facebook. I’ve put my file on root folder which is accessible by http://www.mydomain.com/xd_receiver.htm but my facebook login code was on a page like http://www.mydomain.com/news/, so it tried to access that page by http://www.mydomain.com/news/xd_receiver.htm Later i’ve modified my code as below and the issue solved 🙂