Awesome
twitter-cmd
Simple CLI Twitter client.
Post something to Twitter from command line :-) May be useful in shell script use ?
Build
-
Launch build environment
docker-compose run build-env
-
Set OAuth CONSUMER_KEY and CONSUMER_SECRET
- Get your key/secret from Twitter Developpers > Apps page.
- Set it to consumer_token.go
-
Fetch dependent packages
make deps
-
Build
make
ormake build-windows
Or you can download pre compiled executable from releases.
Usage (Get OAuth token)
-
Start OAuth Authentication
./twitter 1
This will show Authenticate URL like this
Open this URL and login with your Twitter account.
https://api.twitter.com/oauth/authenticate?oauth_token=xxxxxxxxxx
-
Open Authenticate URL by browser.
-
Enter PIN
Enter PIN: *******
Token saved to .ichikawayukko-twitter_cmd
Erase this file to re-authenticate.
Usage (Tweet)
-
Tweet !!
Linux:
./twitter Hello World!
Windows:
twitter.exe Hello World!
-
Tweet with image
./twitter -m filename1 Hello World?
./twitter -m filename1 -m filename?2 Hello World?
(4 files can be specified at one time)