Manage Likes: Standard v1.1 compared to X API v2
If you have been working with the standard v1.1 POST favorites/create and POST favorites/destroy endpoints, the goal of this guide is to help you understand the similarities and differences between the standard v1.1 and X API v2 manage Likes endpoints.- Similarities
- OAuth 1.0a User Context
- Differences
- Endpoint URLs and HTTP methods
- App and Project requirements
- Request parameters
Similarities
OAuth 1.0a User Context authentication method Both the endpoint versions support OAuth 1.0a User Context. Therefore, if you were previously using one of the standard v1.1 manage favorites endpoints, you can continue using the same authentication method if you migrate to the X API v2 version.Differences
Endpoint URLs and HTTP methods- Standard v1.1 endpoints:
- POST https://api.x.com/1.1/favorites/create.json (like a Post)
- POST https://api.x.com/1.1/favorites/destroy.json (unlike a Post)
- X API v2 endpoint:
- POST https://api.x.com/2/tweets/:id/likes (like a Post)
- DELETE https://api.x.com/2/tweets/:id/likes/:tweet_id (unlike a Post)
| Standard v1.1 | X API v2 |
|---|---|
| id | id |
| includes_entities | No equivalent |
Code examples
Like a Post (v2)
cURL
Unlike a Post (v2)
cURL