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.
このガイドでは、特定のポストをリポストしたユーザーを取得する方法を説明します。
前提条件開始する前に、次のものが必要です。
- 承認済みの App を持つ 開発者アカウント
- App のベアラートークン (公開データ用) またはユーザーアクセス・トークン (非公開メトリクス用)
ポストIDを確認する
リツイートしたユーザーを取得したいポストのIDを確認します:https://x.com/XDevelopers/status/1354143047324299264
└── ここがポストIDです
リクエストを送信する
curl "https://api.x.com/2/tweets/1354143047324299264/retweeted_by?\
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"
}
}
expansions を使用して、ピン留めされた投稿などの関連データを取得します:
curl "https://api.x.com/2/tweets/1354143047324299264/retweeted_by?\
user.fields=created_at&\
expansions=pinned_tweet_id&\
tweet.fields=created_at" \
-H "Authorization: Bearer $BEARER_TOKEN"
{
"data": [
{
"pinned_tweet_id": "1389270063807598594",
"created_at": "2018-11-21T14:24:58.000Z",
"id": "1065249714214457345",
"username": "TwitterSpaces",
"name": "Spaces"
}
],
"includes": {
"tweets": [
{
"created_at": "2021-05-03T17:26:09.000Z",
"id": "1389270063807598594",
"text": "now, everyone with 600 or more followers can host a Space..."
}
]
}
}
APIリファレンス
エンドポイントの完全なドキュメント