I am adding facebook comments to my iPad application using UIWebView and HTML5 code provided by Facebook. When the user is not logged in, the application shows the comments and button "Login to Facebook to Post a Comment".

Clicking the button takes me through login process. After the login completes the view is redirected with an empty page with "Login complete" message. It is not redirected back to the comments dialog.

Right now I implemented an ugly workaround. Upon receiving webViewDidFinishLoad event, I look at contents of the page and reload it if the page shows this message. Though, it does not seem a clean way to go.
Why doesn't Facebook redirect me back to original comments page?