Skip to content

Instantly share code, notes, and snippets.

@igalic
Forked from Treeki/tweet_deleter.sh
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igalic/819800c4b87505bbf020 to your computer and use it in GitHub Desktop.
Save igalic/819800c4b87505bbf020 to your computer and use it in GitHub Desktop.
# Usage:
# 1. Install twurl from RubyGems
# 2. Create a Twitter app at https://apps.twitter.com/ (if you don't have one)
# 3. twurl authorize --consumer-key ldny[...]ulfQ --consumer-secret MTXY[...]TRsI
# 4. bash tweet_deleter.sh 2010-05 tweets.csv
# Use at your own risk ;)
tweet_date=$1
tweet_file=$2
for tweet_id in $(awk -F'"' '/^"[0-9]+","[0-9]*\","[0-9]*","'$tweet_date'/ {print $2}' $tweet_file); do
twurl -X POST /1.1/statuses/destroy/$tweet_id.json
sleep 15
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment