shelltwit allows you to update your twitter status via command line. It also has bit.ly integration for url shortening.
It's a good example of twitter API calls with xAuth. As of Jun-05-2017 it uses PIN-based authorization
Little more (?) info about it at the original blog post
Implemented Twitter APIs
- Status Update
- Status Mentions
- Status Home Timeline
- Status User Timeline
- Favorites List
- Streaming statuses
- Streaming user
As of June 11th 2018 there's a single solution in .NEET Core 2.1. After downloading the repo just build the sln with Visual Studio 2017 (15.7+).
but it can now work on your machine thanks to Docker
In order to build your own container you must run the following command
docker run -e "TWIT_KEY=<Your Twitter Key>" -e "TWIT_SECRET=<Your Twitter Secret>" -it --name twit sebagomez/shelltwit
Copy and paste the provided URL in your favorite browser, authorize the app to access twitter on your behalf and copy and paste the provided PIN in the command line waiting for it.
Now you have a container with the needed credentials to access the Twitter API.
We'll now commit those changes into a new image:
docker commit twit mytwit
And that's it, you can now call commands inside the newly created image as follows:
docker run --rm mytwit --help
Sebagomez.Shelltwit version 18.104.22.168 for Microsoft Windows 10.0.17134 Copyright (C) @sebagomez. All rights reserved. Usage: twit [options] | <status> [<mediaPath>] Options: -c|--clear clears user stored credentials -t|--timeline show user's timeline (Default) -q|--query query twits containing words -m|--mentions show user's mentions -u|--user show another user's timeline -k|--track live status with a specific track -s|--streamed streamed user timeline -l|--likes user's likes (fka favorites) -h|--help show this help status: status to update at twitter.com mediaPath: full path, between brackets, to the media files (up to four) to upload.