- Clone the repository:
git clone git@github.com:0xnaman1/tinytweet.git- Create a .envrc file in the root of the project and add the following variables. I used
direnvpkg for the env variables. In case you are using some other env pkg, you might have to modify themain.gofile to read the env variables.
export CONSUMER_KEY="YOUR_CONSUMER_KEY"
export CONSUMER_SECRET="YOUR_CONSUMER_SECRET"
export ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
export ACCESS_SECRET="YOUR_ACCESS_SECRET"I used https://developer.x.com/ to get the consumer key, consumer secret, access token, and access secret. Twitter uses OAuth 1.0a for authentication.
- Install the dependencies:
go mod tidy- Build the binary:
go build .- Run the binary:
tinytweet