title: Javascript library to connect to facebook chat
body: <p>I am trying to create a mobile version of a facebook chat client. I am using Titanium appcelerator to do the job so I write Javascript code. </p>
  
  <p>I need a working library that is not DOM dependent (there is no DOM on mobile devices) or uses it in a minor way that will allow me to quickly change it.</p>
  
  <p>it should also be as small as possible. I will take care of the GUI but I need the communications and protocol part.</p>
  
  <p>Also, do I need any other components to connect to facebook XMPP servers ? BOSH or something like that ? why is it needed ?</p>
  
  <p>thanks</p>