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이 있는 개발자 계정
- App의 Bearer 토큰(공개 데이터용) 또는 사용자 액세스 토큰(비공개 지표용)
특정 게시물에 좋아요를 누른 사용자 목록을 가져옵니다:
curl "https://api.x.com/2/tweets/1354143047324299264/liking_users?\
user.fields=created_at,username,verified" \
-H "Authorization: Bearer $BEARER_TOKEN"
{
"data": [
{
"created_at": "2008-12-04T18:51:57.000Z",
"id": "17874544",
"username": "TwitterSupport",
"name": "Twitter Support",
"verified": true
},
{
"created_at": "2007-02-20T14:35:54.000Z",
"id": "783214",
"username": "Twitter",
"name": "Twitter",
"verified": true
}
],
"meta": {
"result_count": 2,
"next_token": "7140dibdnow9c7btw3z2vwioavpvutgzrzm9icis4ndix"
}
}
특정 사용자가 좋아요를 누른 포스트를 조회합니다:
curl "https://api.x.com/2/users/2244994945/liked_tweets?\
tweet.fields=created_at,public_metrics&\
max_results=10" \
-H "Authorization: Bearer $BEARER_TOKEN"
{
"data": [
{
"id": "1362449997430542337",
"text": "Honored to be the first developer to be featured...",
"created_at": "2021-02-18T17:45:00.000Z",
"public_metrics": {
"retweet_count": 5,
"reply_count": 2,
"like_count": 42,
"quote_count": 1
}
}
],
"meta": {
"result_count": 1,
"next_token": "7140dibdnow9c7btw4539n0vybdnx19ylpayqf16fjt4l"
}
}
expansions 매개변수를 사용해 고정 포스트와 같은 관련 데이터를 가져오세요:
curl "https://api.x.com/2/tweets/1354143047324299264/liking_users?\
user.fields=created_at&\
expansions=pinned_tweet_id&\
tweet.fields=created_at" \
-H "Authorization: Bearer $BEARER_TOKEN"
좋아요 관리
포스트에 좋아요를 누르거나 취소하기