【问题标题】:Is it possible to send a Google hangouts chat message using node.js?是否可以使用 node.js 发送 Google Hangouts 聊天消息?
【发布时间】:2014-08-01 14:59:41
【问题描述】:

我正在寻找一种向新的 Gmail 聊天窗口发送消息的方法 - 显然是 Google Hangout。我知道旧式聊天支持 XMPP,但是是否有 API 可以使用来自 node.js 的 Google Hangouts 发送任何内容?

【问题讨论】:

    标签: node.js google-hangouts


    【解决方案1】:

    https://github.com/jaxbot/hangouts-bot

    安装

    npm install hangouts-bot
    

    代码

    var hangoutsBot = require("hangouts-bot");
    var bot = new hangoutsBot("someone@gmail.com", "password");
    
    bot.on('online', function() {
        console.log('online');
    });
    
    bot.on('message', function(from, message) {
        console.log(from + ">> " + message);
    });
    

    原文来源:hangouts-bot README

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-20
    • 1970-01-01
    相关资源
    最近更新 更多