-
Notifications
You must be signed in to change notification settings - Fork 1
Adapter: Twitter
Twitter is a social network site.
You should report any issues or submit any pull requests to the Twitter adapter repository.
You will also need to edit the package.json for your hubot and add the
hubot-twitter adapter dependency.
"dependencies": {
"hubot-twitter": ">= 2.0.4",
"hubot": ">= 2.0.0",
...
}
Then save the file, and commit the changes to your hubot's git repository.
If deploying to Heroku you will need to edit the Procfile and change the
-a campfire option to -a twitter. Or if you're deploying locally
you will need to use -a twitter when running your hubot.
The Twitter adapter requires only the following environment variables.
HUBOT_TWITTER_KEYHUBOT_TWITTER_SECRETHUBOT_TWITTER_TOKENHUBOT_TWITTER_TOKEN_SECRET
You will need to give your app read and write permissions.
This is the consumer key you get after creating a new application at https://dev.twitter.com. Make a note of it.
You will need to give your app read and write permissions.
This is the consumer secret you get after creating a new application at https://dev.twitter.com. Make a note of it.
This is the access token you get after generating the access token and token secret as the user you created the app under. Make a note of it.
This is the access token secret you get after generating the access token and token secret as the user you created the app under. Make a note of it.
% heroku config:add HUBOT_TWITTER_KEY="..."
% heroku config:add HUBOT_TWITTER_SECRET="..."
% heroku config:add HUBOT_TWITTER_TOKEN="..."
% heroku config:add HUBOT_TWITTER_TOKEN_SECRET="..."
% export HUBOT_TWITTER_KEY="..."
% export HUBOT_TWITTER_SECRET="..."
% export HUBOT_TWITTER_TOKEN="..."
% export HUBOT_TWITTER_TOKEN_SECRET="..."
Using PowerShell for the current session
% Set-Item -path env:HUBOT_TWITTER_KEY -value ("...")
% Set-Item -path env:HUBOT_TWITTER_SECRET -value ("...")
% Set-Item -path env:HUBOT_TWITTER_TOKEN -value ("...")
% Set-Item -path env:HUBOT_TWITTER_TOKEN_SECRET -value ("...")
Using the Command Prompt for the current session
% SET HUBOT_TWITTER_KEY="..."
% SET HUBOT_TWITTER_SECRET="..."
etc.
To set them permanently, right click on Computer in Explorer, then click Properties, Advanced System Settings and then the Environment Variables button in the lower right corner.
Alternatively, use a command line program like SETX, which can also be run remotely. SETX has the ability to remotely set environment variables too. This method has been tested on Windows 8 Pro RTM.