Script to delete tweets with Golang
-
Setup twitter api secrets
First, publish your credentials from twitter developer potal. Add your twitter api keys to the
.env
file.CONSUMER_KEY= CONSUMER_SECRET= ACCESS_TOKEN= ACCESS_SECRET=
-
Prepare your archived twitter data
Download your archived twitter data from here. Then place
tweet.js
file inside to the project root. -
Format your twitter data into json
Run the command below.
$ sed '1d' tweet.js | sed '1i [' > tweet.json
$ go run main.go --from 2022-01-01 --to 2022-05-01