使用 strope.js 和旁遮普语将 Google Talk 集成到网络应用程序
我正在尝试将 Google Talk(又名 gtalk)集成到我的网络应用程序中。这将是一个紧密的集成,因此 Google Talk 聊天徽章以及使用 iframe 嵌入 Google 基于 Flash 的 Web 客户端无法完成这项工作。
如果网络上还没有可用的基于 HTML 的客户端,我可能需要从头开始构建客户端。经过一些研究,我认为解决方案是使用 strope.js 作为前端,使用 punjab 作为中间件与 Google Talk 服务器进行通信。听起来正确吗?有没有涵盖该主题的优秀博客文章或教程?
对于前端来说,strope.js 能拉取联系人列表吗?以及联系人的在线状态?在进一步深入研究之前,我试图先了解大局。现在,旁遮普对我来说就像一个完整的黑匣子。一旦安装并运行,似乎不需要做太多设置。
有什么意见吗?
I'm trying to integrate Google Talk (a.k.a. gtalk) into my web app. It's going to be a tight integration, so Google Talk chatback badge, and embedding Google's flash based web client using an iframe won't do the job.
I'll probably need to build the client from scratch if there is not already a HTML based client available on the web. After doing some research, I think the solution is to use strophe.js for the front-end and punjab as the middleware to communicate to Google Talk server. Does it sound about right? Is there any good blog post or tutorial that covers this topic?
For the front-end, will strophe.js be able to pull the contact list; as well as, the online status of the contacts? I'm trying to understand the big picture first before digging into any further. Right now, punjab is like a complete black box to me. It appears that there is not much setting up to do once it is installed and running.
Any comments?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我首先想确定我理解你的问题。我想我们可以用两种方式来理解你的问题,这会给你两个完全不同的答案。如果您想拥有与
Google Talk 聊天徽章
相同的功能,以便您网站的访问者可以与您的 Gtalk 帐户 (JID) 聊天,那么我认为您应该看看B 部分)
我认为 strope.js 作者的这个链接非常有趣,解释了 “您需要哪个 BOSH 服务器”
A) 您想使用 Gtalk 与名册中的其他用户聊天
http://web.archiveorange.com/archive/v/kjZWxPJeyGfVyAwpJnZm
引用 Matthew狂野(作者prosody.im):
B) 您希望访问您网站的用户与您聊天
我认为 GTalk(Google) 不喜欢您使用 Gtalk 的服务器进行 BOSH 连接,以便其他访问您网站的用户可以与您交谈。在这种情况下,我认为您应该拥有自己的 XMPP 服务器。 XMPP 的优点是它们可以与其他服务器互操作,也可以与您的 Gtalk JID 互操作。
例如,您可以使用非常好的 prosody.im,它也内置了 BOSH。使用 prosody.im 中的 strope 非常简单。
专业XMPP
此外,我建议您阅读professionalxmpp这本书来学习如何使用strope.js。您可以从 scribd 阅读预览。
我认为您可以在以下位置获取信息:
I first like to make certain I understand your question. I think we can understand your question in two ways, which will give you two completely different answers. If you want to have the same functionality as
Google Talk chatback badge
so that visitor of your website can chat with your Gtalk account(JID) then I think you should have a look atsection B)
I think this link from strophe.js author is pretty interesting explaining "Which BOSH Server Do You Need"
A) You want to use Gtalk to chat with other users in your roster
http://web.archiveorange.com/archive/v/kjZWxPJeyGfVyAwpJnZm
Quote from Matthew Wild(Author prosody.im):
B) You want the users visiting your site to chat with you
I don't think GTalk(Google) likes you to use Gtalk's server for your BOSH connections, so that other users visiting your website can talk to you. In that case I think you should have your own XMPP server. The nice thing about XMPP is that standard they are interoperable with other servers, so also to your Gtalk JID.
You could for example use the very nice prosody.im which also has BOSH built-in. Using strophe from prosody.im is very simple.
Professional XMPP
Furthermore I recommend you to read the book professionalxmpp to learn how to use strophe.js. You can read a preview from scribd.
I think you can your information at: