screen_names か user_ids をコンマ区切りの一覧で最大100まで設定し、そのユーザー達と認証ユーザーとの関係性を取得します。
connections値には以下の値が入ります。: following, following_requested, followed_by, none, blocking, muting。
GET friendships/
|
https://api.twitter.com/1.1/friendships/lookup.json
Resource URL
|
Resource Information
Response formats
JSON
Requires authentication?
Yes (user context only)
Rate limited?
Yes
Requests / 15-min window (user auth)
15
|
一回のリクエストで、最大100個のスクリーンネームをコンマ区切りで一覧にできます。
サンプル値: twitterapi,twitter
一回のリクエストで、最大100個のユーザーIDをコンマ区切りで一覧にできます。
サンプル値: 783214,6253282
Parameters
screen_name
optional
A comma separated list of screen names, up to 100 are allowed in a single request. Example Values:
user_id
optional
A comma separated list of user IDs, up to 100 are allowed in a single request. Example Values: |
ログインして登録アプリケーションの一覧を参照してください。
OAuth Signature GeneratorSign in to see a list of your registered applications. |
GET
https://api.twitter.com/1.1/friendships/lookup.json?screen_name=episod,twitterapi,whiteleaf,andypiper
Example RequestGET
|
[
{
"name": "Taylor Singletary",
"screen_name": "episod",
"id": 819797,
"id_str": "819797",
"connections": [
"following",
"followed_by"
]
},
{
"name": "Twitter API",
"screen_name": "twitterapi",
"id": 6253282,
"id_str": "6253282",
"connections": [
"following",
"followed_by"
]
},
{
"name": "White Leaf",
"screen_name": "whiteleaf",
"id": 22479443,
"id_str": "22479443",
"connections": [
"followed_by",
"muting"
]
},
{
"name": "Andy Piper",
"screen_name": "andypiper",
"id": 786491,
"id_str": "786491",
"connections": [
"none"
]
}
]
Example Result
[
{
"name": "Taylor Singletary",
"screen_name": "episod",
"id": 819797,
"id_str": "819797",
"connections": [
"following",
"followed_by"
]
},
{
"name": "Twitter API",
"screen_name": "twitterapi",
"id": 6253282,
"id_str": "6253282",
"connections": [
"following",
"followed_by"
]
},
{
"name": "White Leaf",
"screen_name": "whiteleaf",
"id": 22479443,
"id_str": "22479443",
"connections": [
"followed_by",
"muting"
]
},
{
"name": "Andy Piper",
"screen_name": "andypiper",
"id": 786491,
"id_str": "786491",
"connections": [
"none"
]
}
]
|