Skip to main content

Overview

The like and unlike commands allow you to interact with tweets by adding or removing your likes (favorites).

Like a Tweet

twitter like <tweet_id>
Add a tweet to your likes. The tweet will appear in your “Likes” tab on your profile.

Unlike a Tweet

twitter unlike <tweet_id>
Remove a tweet from your likes.

Examples

Like a Tweet

twitter like 1234567890123456789
Output:
❤️ Liking tweet 1234567890123456789...
✅ Done.

Unlike a Tweet

twitter unlike 1234567890123456789
Output:
💔 Unliking tweet 1234567890123456789...
✅ Done.

Like from Tweet URL

You can also extract the tweet ID from a full URL:
# Extract the numeric ID from the URL
twitter like 1234567890123456789

# Full URL: https://x.com/username/status/1234567890123456789

Command Reference

Like

Arguments:
  • tweet_id (required): The numeric tweet ID
Syntax:
twitter like <tweet_id>

Unlike

Arguments:
  • tweet_id (required): The numeric tweet ID
Syntax:
twitter unlike <tweet_id>

Finding Tweet IDs

You can find tweet IDs in several ways:
  1. From URL: The numeric ID at the end of a tweet URL
    https://x.com/username/status/1234567890123456789
                                   └─ This is the tweet ID
    
  2. Using the CLI: Use twitter feed or twitter search to view tweets with their IDs
  3. Tweet detail command: Use twitter tweet <url> to get detailed information

Rate Limits and Anti-Detection

Rate Limits: Twitter enforces strict rate limits on like/unlike operations. If you like too many tweets too quickly, you may be temporarily blocked from liking for 15+ minutes.
Anti-Detection Features:
  • Automatic delays of 1.5-4 seconds after each operation
  • Randomized timing to appear more human-like
  • Chrome browser fingerprint impersonation
  • Automatic retry with exponential backoff on rate limit errors

Rate Limit Recommendations

  • Maximum: ~50 likes per 15-minute window
  • Recommended: Fewer than 30 likes per 15 minutes
  • Wait time: If rate limited, wait at least 15-20 minutes

Error Handling

Common Errors

Already liked:
 Twitter API: You have already liked this tweet
Already unliked:
 Twitter API: You have not liked this tweet
Rate limited:
 Rate limited: You have exceeded your like limit (try again later, recommended wait: 15+ minutes)
Tweet not found:
 Twitter API error 404: Tweet not found
Twitter’s API will return specific error codes (348, 349) for write operation rate limits. The CLI automatically translates these into user-friendly messages.

Bulk Operations

Avoid bulk liking operations. Twitter’s anti-spam systems actively monitor for automated behavior. Use the CLI responsibly and maintain human-like usage patterns.
If you need to like multiple tweets:
  1. Add delays between operations (use shell sleep)
  2. Keep total likes under recommended limits
  3. Vary your actions (don’t just like, also read feeds)

Build docs developers (and LLMs) love