Skip to content

Delete all favorite tweets (unfav) from your account, delete all favorite tweets (unfav) before the last X days.

License

Notifications You must be signed in to change notification settings

cachuco/Delete-favorites-script---Google-Apps-Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Delete-favorites-script---Google-Apps-Script

Delete favorite tweets (unfav) from your account, delete all favorite tweets (unfav) before the last X days.

Twitter API only return the user’s most recent 3200 favorited tweets.

Google Apps Script has a limitation on the script runtime of 6 min, so it is advisable to schedule a script execution automatically every 15 minutes so as not to exceed the limits of the Twitter API requests.

Prerequisites

Create new twitter app and configure API

  1. Open Twitter's Application Management, and create a new Twitter app.
  2. Set the permissions of your app to Read and Write.
  3. Set the required environment variables

Create new Google Apps Script project Google Apps Script

Copy deleteFavs.gs file in you GAS project and configure variables

Execute script and enjoy your life

Use

Configure the following variables:

var TWITTER_USER = 'YOUR TWITTER USER NAME';
var MAX_AGE_IN_DAYS = 30;
var TWEETS_PER_REQUEST = 200;
var CONSUMER_KEY = 'YOUR CONSUMER KEY';
var CONSUMER_SECRET = 'YOUR CONSUMER CONSUMER_SECRET';
var ACCESS_TOKEN = 'YOUR ACCESS TOKEN';
var ACCESS_SECRET = 'YOUR ACCESS SECRET';
variable description
TWITTER_USER Twitter username (exclude @)
MAX_AGE_IN_DAYS tweets with a date greater than this number, will be deleted
TWEETS_PER_REQUEST Number of tweets per API request
CONSUMER_KEY The Consumer Key from your Twitter App
CONSUMER_SECRET The Consumer Secret from your Twitter App
ACCESS_TOKEN The Access Token from your Twitter App
ACCESS_SECRET The Access Secret from your Twitter App

Versioning

1.0.0

License

See the LICENSE file for license rights and limitations (GPL-3).

About

Delete all favorite tweets (unfav) from your account, delete all favorite tweets (unfav) before the last X days.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published