Documentation Index
Fetch the complete documentation index at: https://generaltranslation.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
이 가이드는 X API를 사용해 포스트에 좋아요를 누르고 취소하는 방법을 단계별로 설명합니다.
사전 준비 사항시작하기 전에 다음이 필요합니다.
- 승인된 App이 있는 개발자 계정
- 사용자 액세스 토큰(OAuth 1.0a 또는 OAuth 2.0 PKCE)
게시물 ID 가져오기
게시물을 볼 때 URL에서 게시물 ID를 확인하세요:https://x.com/XDevelopers/status/1228393702244134912
└── 이것이 게시물 ID입니다
좋아요 요청 보내기
curl -X POST "https://api.x.com/2/users/123456789/likes" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"tweet_id": "1228393702244134912"}'
응답 확인하기
{
"data": {
"liked": true
}
}
게시물의 좋아요를 취소합니다:
curl -X DELETE "https://api.x.com/2/users/123456789/likes/1228393702244134912" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN"
응답:
{
"data": {
"liked": false
}
}
좋아요 조회
게시물에 좋아요를 누른 사용자 가져오기