Step 2.
First of all make sure that your template contains the following just below your <!DOCTYPE................> declearation
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
now create a plugin with the following code
$e = $modx->Event;
$startscript = '<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script> ';
$endscript='<script type="text/javascript"> FB.init("'.$account.'","xd_receiver.htm"); </script> ';
switch ($e->name) {
case "OnWebPagePrerender":
$o = &$modx->documentOutput; // get a reference of the output
$o = str_replace("<body>","<body>".$startscript,$o);
$o = str_replace("</body>",$endscript."</body>",$o);
break;
default :
return; // stop here - this is very important.
break;
}
Then click on configuration tab of the plugin and paste the following into the plug in configuration box.
then enter your facebook app api into the paramiter value box - if you have not generated a facebook app follow the instructions on
http://wiki.developers.facebook.com/index.php/Trying_Out_Facebook_Connect
now click on the system events tab and select OnWebPagePrerender.
next paste the following code into your site where you want the FBConnect button to appear.
<fb:login-button></fb:login-button>
this will put the button on the page but not much else at the moment.