使用XMPP和Openfire的Web应用程序中的聊天功能 [英] Chat functionality in web application using XMPP and Openfire

查看:157
本文介绍了使用XMPP和Openfire的Web应用程序中的聊天功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用XMPP和Openfire在我的Web应用程序中创建聊天功能.我已经集成了converse js,但是我没有找到文件附件,所以任何人都可以让我知道使用XMPP和openfire的另一种最佳选择吗?

I want to create chat functionality in my web application using XMPP and Openfire.. I have integrated converse js but I haven't found file attachment so any one let me know another best option using XMPP and openfire??

推荐答案

这是一个用 jQuery +

Here is a very simple chat demo written in jQuery + StropheJS:

http://plnkr.co/edit/EhQHDsYpDhrECmaaIlZO

您必须部署自己的Openfire并根据您的配置调整以下代码行:

You have to deploy your own Openfire and adapt the followin code lines according to your configuration:

var server = 'mydomain.com';
var BOSH_SERVICE = 'http://127.0.0.1:7070/http-bind/';
var ROOM = 'prova@conference.' + server;

...

$('#jid').get(0).value = "pippo@mydomain.com";
$('#pass').get(0).value = "pippo";

这篇关于使用XMPP和Openfire的Web应用程序中的聊天功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆