Many tweets in a zombie favorite, but not favorite, state?


#1

I am writing a tweepy script to un-like (un-favorite [sic]) tweets.

However, I get an error when I try to unlike many messages, “message not found”.

        try:
          api.destroy_favorite(f.id)
          print("SUCCESS {}".format(f.text))
        except tweepy.error.TweepError:
          print("FAILURE {} {}".format(f.text, f.id))
          time.sleep(6)
          api.create_favorite(f.id)
          time.sleep(6)
          api.destroy_favorite(f.id)

The resolution seems to be, as the script shows, to favorite the tweet and then un-favorite it.

If I click on the “/i/likes” regular web endpoint for my user I see about 11k liked tweets but none of them have a heart beside them. If I click the heart, then unclick the heart, it is removed from the list. This agrees with what I’m seeing on the API endpoints.

Is it possible that my user’s favorite list has somehow gotten into a bad “troolean” state of not being liked, but also not being un-liked? Can I ask Twitter to fix this or should I continue with my hack of liking and then unliking everything, which will piss off about 11k people as I go through the list.

UPDATE the favourites list is coming back empty after the first few pages of results and this workaround no longer works. It seems that older (1+ month) likes are put into cold storage and cannot be accessed via the REST API.


Rate limiting is much harsher than the docs suggest
Rate limiting is much harsher than the docs suggest
#2

to workaround this I appear to be able to manually click the heart on a tweet in my /i/likes web view and they appear in the favorites list again.

I’ve been running this for the last 15 minutes or so and I’m thinking about letting it run all night

function toggle_like() {
  $('.js-actionFavorite').not('.ProfileTweet-actionButtonUndo').click();
  setTimeout(remove_tweets, 5000);
}

function remove_tweets() {
  $('.tweet').remove();
  setTimeout(scroll_down_1, 5000);
}

function scroll_down_1() {
  window.scrollTo(0, 0);
  setTimeout(scroll_down_2, 5000);
}

function scroll_down_2() {
  window.scrollTo(0, document.body.scrollHeight);
}

setInterval(toggle_like, 20000);

#3

Hi Sam. I don’t have a response I feel you’ll be happy with, but I do want to reply to your post.

What I believe you’re potentially describing is “older” likes where the current state may have been moved to less current storage. It is difficult in situations where these go beyond many months to keep all of these live and up-to-date from a state perspective. This is somewhat of a scaling issue. Can we do better for our API platform? Yes. There’s no immediate plans I’m aware of to “fix” this.

Automation is disallowed on a large scale either on the REST API, and more specifically on scripting the web UI outside of the approved developer API surfaces. I’m sure you will be disappointed about that, but we need to be clear about this.

Twitter’s platform does not provide a way to mass delete Tweets or likes and neither does the API. Sorry.


#4

You are correct that this answer is disappointing. But it is nonetheless good to hear some guesses and background about what I see. So thanks for that.

I hope recent laws in the EU will force Twitter to take deleting content more seriously. My only other alternative is to delete my account.


#5

Thank you for your answer @andypiper. It is very discouraging that there’s no way for a user to delete their own posts or activity from the platform. For example, I would like to erase all of my likes as my usage of the site has changed and I’d like to have control over my own data. But now I can’t.

If there’s any way for staff to wipe old likes/tweets, that would be great. I’d rather not close a 10 year old account because of this limitation.


#6

I was able to wipe all my visible Likes using the “not allowed” script above.

But now my profile says I have 10.5k Likes, but none are visible.

I think I’d be happy calling for a recount at this point!


#7

We’re unable to assist with anything related to user accounts via the developer platform or this forum.

Please see the Help Center, and specifically this article, for more information.


#8

There’s likely to be a time delay between these likes having been removed and the backend systems synchronising data counts, so this may improve over time.


#9

Thanks. I’m aware of how to delete tweets/likes, but was more referring to there not being a way to reliably retrieve information from the API.

I’ve contacted support staff multiple times for related account-related questions (knowing this isn’t the appropriate venue), but have never received a response or resolution there either. :man_shrugging: