XMPP library for facebook chat [closed]

隐身守侯 提交于 2019-12-18 01:31:45

问题


So facebook is opening its chat servers to us... great. I am new to XMPP, so what would be the best JS library to connect to their servers?

I googled for a tutorial article, but found nothing. Can someone direct me to one?


回答1:


As Joschi pointed out strophe is a very good javascript library. But you need a BOSH manager to connect from javascript to XMPP. You could use a standalone manager like for example punjab.

If you can not run a BOSH manager then you could also connect to XMPP via flash without BOSH.




回答2:


I recommend using strophe.js. For communicating directly with a different server and bypassing the same origin policy of javascript you could use strophe with flxhr plugin, which is a neat flash based workaround. So no connection manager setup (webserver proxy to punjab and so on) is required on your server.

I also recommend the book "Professional XMPP Programming with JavaScript and jQuery". It comes with a whole lot of sample javascript/html applications code.




回答3:


strophe.js is a powerful and widely used XMPP library for JavaScript.



来源:https://stackoverflow.com/questions/3598900/xmpp-library-for-facebook-chat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!