フォローの管理: Standard v1.1 と X API v2 の比較
- 共通点
- OAuth 1.0a の User Context
- 相違点
- エンドポイント URL
- App と Project の要件
- HTTP メソッド
- リクエストパラメータ
類似点
相違点
- Standard v1.1 エンドポイント:
- POST https://api.x.com/1.1/friendships/create.json (ユーザーをフォロー)
- POST https://api.x.com/1.1/friendships/destroy.json (ユーザーのフォローを解除)
- X API v2 エンドポイント:
- POST https://api.x.com/2/users/:id/following (ユーザーをフォロー)
- DELETE https://api.x.com/2/users/:source_user_id/following/:target_user_id (ユーザーのフォローを解除)
| Standard v1.1 | X API v2 |
|---|---|
| 対応なし | id (POST), source_user_id (DELETE) |
| user_id | target_user_id |
| screen_name | 対応なし |
コードサンプル
ユーザーをフォローする (v2)
cURL
ユーザーのフォローを解除する (v2)
cURL