dongsaoshuo4326 2011-01-11 12:29
浏览 61
已采纳

XMPP,openfire和bot问题

I am interested to make a chatbot. My script is currently working fine with imified.com bot. however imified is down almost everday. so i am looking for my own solution.

during my findings, I have found (through this site) openfire and I have configured it and it is working fine even with gmails users.

but i am still not getting what I need.

I need to request a URL (with the chat scripts and some other user data something like imified provides) when each gmail or other external users send me a message. let me explain.

my openfire is hosted and working for mybot.com and my id is: autobot@mybot.com.

now a gmail user say client@gmail.com added me in his gtalk/piding and we can communicate each other. he can send me message and I can reply.

but I need a robot instead of me. when client@gmail.com (and any other user) sends me a message, I need to request a URL so that i can dynamically generate response based on the message he/she sent.

in which way I should go for achieving this? Is there any way to customize openfire to do so?

or should I make a php/python (i need to learn python though) script that will listen to xmpp ports and generate responses? if so, any helpful scripts that may guide me?

bunch of thanks for reading it and thanks in advance for providing any response.

  • 写回答

4条回答 默认 最新

  • douyi3760 2011-11-28 13:53
    关注

    The OpenFire understand XMPP, what you need is XMPP library/API (like XMPP4R if you are Rubyist). Using it your app will login to OpenFire (by sending gmail/yahoo credentials) and others will see you as online. But when they will reply to you, you will be notified in your application. Where you can receive the message, process it, and send response (by writing a required program/logic).

    We have done it in our SMS Chat application with Gmail/Yahoo messenger friends/contacts.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥20 Python安装cvxpy库出问题
  • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误
  • ¥15 python天天向上类似问题,但没有清零
  • ¥30 3天&7天&&15天&销量如何统计同一行
  • ¥30 帮我写一段可以读取LD2450数据并计算距离的Arduino代码
  • ¥15 C#调用python代码(python带有库)
  • ¥15 矩阵加法的规则是两个矩阵中对应位置的数的绝对值进行加和
  • ¥15 活动选择题。最多可以参加几个项目?
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
  • ¥15 vs2019中数据导出问题