Use Facebook Connect button on login form in a modal box
Hi all,
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.
Do I need to pass any javascript to initiate fb button when I open the dialog boxes?
- Forums:

FB.XFBML.parse();
When ajax adds markup to a page, you need to tell facebook's javascript to parse the new HTML. If you use Drupal's javascript framework, this will happen automatically. Sounds like you're not doing that.
You'll want to call
FB.XFBML.parse();or betterFB.XFBML.parse(elem);(if you know the parent element of the new markup).