You can start by hacking the boshchat example from 2.1.2.
you must firt acquire the session_key from facebook with the facebook php-sdk (take a look at the example.php in php-sdk to do this).
modify the bosh chat like this:
1) inizialize jaxl:
$jaxl = new JAXL(array(
'user'=>$me['name'], /this from facebook sdk
'pass'=>'',
'domain'=>'
chat.facebook.com',
'port'=>5222,
'boshHost'=>'localhost',
'authType'=>'X-FACEBOOK-PLATFORM',
'logLevel'=>4
));
2) add the function to get the key:
function getFacebookKey() {
global $appSecret, $appAPI, $session;
return array(
$appSecret, // Your application secret key
$appAPI, // Your application api key
$session['session_key'] // Connecting user session key
);
}
3) add the facebook plugin:
$jaxl->addPlugin('jaxl_get_facebook_key', 'getFacebookKey');
4) modify the connect case:
case 'connect':
$jaxl->startCore('bosh');
$jaxl->auth('X-FACEBOOK-PLATFORM');
break;
Now you shuld be connected. I Hope this helps, and sorry for my english!
Nicola