Facebook chat related code is broken since 2011 due to the Facebook platform changes (see https://developers.facebook.com/blog/post/2011/09/09/platform-updates--operation-developer-love/ for details). Several attempts were made to update the code but with no luck. If anyone wishes to fix this code then feel free to send pull request.
Latest commit e54b5d1
Oct 17, 2013