Can't Delete More Than 3000 Favorites?


def get_oauth():
    oauth = OAuth1(CONSUMER_KEY,
    return oauth

while 1 == 1:

        if __name__ == "__main__":
                oauth = get_oauth()

                for i in xrange(8):
                        # get favorites tweet data (maximum 200 per call, "count=200"
                        r = requests.get(url="", auth=oauth)
                            # store fav_ids in a list
                        with open("Output.txt", "w") as text_file:
                        fav_ids = [fav['id'] for fav in r.json()]
                        # loop through each fav id and remove from twitter
                        for fav in fav_ids :
                                data = {'id' : fav}
                                response ="",auth=oauth,data=data)
                        print i

This file worked for the first three thousand favorites (which would be the equivalent of it running twice then stopped. The i still prints out but no favorites come back. I thought it was a day rate limit but it wasn’t.

Is it just that the Twitter API won’t return past a certain date/volume of favorites?


Thanks for the thoughtful question. This is before my time, and the behavior you explained is consistent with this older blog post.

I’ll poke around to see if I can get a definitive answer, but my hunch right now is that it’s not possible.


Quick update: We only return the user’s most recent 3200 favorited tweets, so you won’t be able to retrieve any older favorites to delete (in the vast majority of circumstances).


This topic was automatically closed after 12 hours. New replies are no longer allowed.