Thanks for the reply mrhaw. I tried that and it still does not work xd_receiver.htm just does not play well with the Jquery/FeatureLoader scripts. I even tried in a simple page without modx getting involved and i got the same results. But if add them in a template it works just fine.
Some other stuff:
the
login($user) function never actually finished loading for me with the original adduser.php snippet posted by Pete, so never got back the span with the facebook avatar and username. For the script to work i had to delete/comment out the following part:
//get login home page
$ok=false;
if(isset($modx->config['login_home']) && $id=$modx->config['login_home']) {
if ($modx->getPageInfo($id)) $ok = true;
}
if (!$ok) {
// check if a login home id page was set
foreach($liHomeId as $id) {
$id = trim($id);
if ($modx->getPageInfo($id)) {$ok=true; break;}
}
}
Now it works like it should. The user is logged to modx via weblogin, and it goes online with facebook (plus it gets added to modx if user does not exist). However i would like not only the facebook connect div to refresh when logged in, but also the
weblogin snippet as well (i dont want the user/password form to be displayed, but the "user has been logged in" dialog... which by the way appears if i do a refresh on the browser on that page, so i know the user IS logged in.) I thought that the invokeEvent "OnWebLogin" would do this but it does not work.
Also the alerts when checking if user has been blocked etc, do not work.
I will continue to work on this and post my findings along the way,
Cheers
Alejandro