I’ve implemented a Facebook login on a website, using the Javascript API and FBML.
When the user clicks Login, enters their credentials into the popup window, goes to the next stage and clicks ‘Don’t Allow’ when prompted for permissions, the window simply closes and nothing else happens.
I want to change it so that when the window closes, the browser then redirects to a URL of my choice.
Is this possible with my current setup, using the Javascript API?
I’m assuming you mean XFBML, since you can’t use anything except FBJS in FBML. This code is from the FB.login documentation:
Whatever goes in that
elseblock is what happens if you don’t get an authorization.top.location.hrefwould work there.