Simple command line Twitter application entirely written in shell script.
- Bash >= 4.0
- cURL
- jq
- Create a new application on Twitter Apps
- Create
.config
file for Twitter keys and tokens - Save your consumer key (API key) as
consumer_key
in the.config
file - Save your consumer secret (API secret) as
consumer_secret
in the.config
file - Generate an OAuth access token for the application
- Save your access token as
access_token
in the.config
file - Save your access token secret as
access_secret
in the.config
file - Give permission to execute the application:
chmod u+x twtr
Your .config
file should look like this:
# API keys
consumer_key="xvz1evFS4wEEPTGEFPHBog"
consumer_secret="kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw"
# personal keys
access_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb"
access_secret="LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE"
Keep the "consumer secret" a secret. Do not share your "access token secret" with anyone.
First of all, this project is an experiment for learning and testing shell scripting possibilities therefore it covers only a small part of the Twitter API.
Display home timeline:
./twtr
Send status update:
./twtr -u "The only source of knowledge is experience. - Albert Einstein"
Display application help:
./twtr -h
This project is licensed under the terms of the MIT License (MIT).