Use Facebook Connect button on login form in a modal box
I've successfully installed and configured Drupal for Facebook on Drupal 6 and I can successfully render a facebook login button using
<?php print theme('fb_login_button', t('Facebook')); ?>. The registration and login forms are customized on my website. When I access /user/login or /user/register I see the facebook connect button rendered and it logs me in with my facebook account.
But my site uses a custom jQuery UI dialog box to display login and register forms on all pages. The content of login and register forms are pulled through ajax. The problem is: when I open the dialog box, facebook connect button is not rendered. It shows only the text, though the same script works on login and register pages.