Giter VIP home page Giter VIP logo

hubot-slack-twitter's Introduction

Hubot Slack Twitter NPM version Github issues Github license

Hubot Slack Twitter allows to post twitt directly from slack.

By adding the Hubot Slack Twitter, you can configure many twitter accounts and bind them to one or more Slack rooms. Then, anybody in the room (even private) can ask the robot to tweet on the dedicated room twitter account.

Moreover, a basic stats report is available by chan / in DM to promote people who tweet the most with Hubot Slack Twitter.



See changelog for releases infos.

Installation

In hubot project repository, run:

npm install --save hubot-slack-twitter

Then add hubot-slack-twitter to your external-scripts.json:

["hubot-slack-twitter"]

If you already have the "hubot-help" script, the Hubot Slack Twitter documentation will be happened to the help response

Configure

Create a twitter-config.js at the root of your hubot directory and fill it with that text and your own config:

{
  "accounts": {
    "custom-twitter-account-1": {
      "consumer_key": "xxxxxxxxxxxxxxx",
      "consumer_secret":"xxxxxxxxxxxxxxx",
      "access_token": "xxxxxxxxxxxxxxx",
      "access_token_secret": "xxxxxxxxxxxxxxx"
    },
    "custom-twitter-account-1": {
      "consumer_key": "xxxxxxxxxxxxxxx",
      "consumer_secret": "xxxxxxxxxxxxxxx",
      "access_token": "xxxxxxxxxxxxxxx",
      "access_token_secret": "xxxxxxxxxxxxxxx"
    }
  },
  "rooms": {
    "roomnameA": "custom-twitter-account-1",
    "roomnameB": "custom-twitter-account-1",
    "roomnameC": "custom-twitter-account-1",
    "username": "custom-twitter-account-2"
  }
}

Now, you can invite your bot in one of the rooms you mentionned in the config, and send a twitt (see example below).

Examples

Post Twitts

Simple link tweet

user>> hubot tweet http://tilap.net/

A link with some description tweet

user>> hubot tweet http://tilap.net/ a smart french blog about various dev tips

Bot Infos

Show the current room twitter account the bot will post on

user>> hubot tweet infos

Statistics

Show statistics

user>> hubot tweet stats

The response will be different:

  • in a direct message with the bot, this will display user stats (cross channel and accounts usage)
  • in a chan with a tweeter bot set up, it will display the chan stats with users contribution ranking

hubot-slack-twitter's People

Contributors

tilap avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.