指定したユーザーからのリツイートやデバイス通知を、有効もしくは無効にします。
POST friendships/
|
https://api.twitter.com/1.1/friendships/update.json
Resource URL
|
Resource Information
Response formats
JSON
Requires authentication?
Yes (user context only)
Rate limited?
Yes
|
screen_name か user_id のどちらかは必ず設定してください。
対象ユーザーのスクリーンネーム。
サンプル値: noradio
対象ユーザーのID。
サンプル値: 12345
対象ユーザーからのデバイス通知を有効もしくは無効にする。
サンプル値: true, false
対象ユーザーからのリツイートを有効もしくは無効にする。
サンプル値: true, false
ParametersProviding either
screen_name
optional
The screen name of the user for whom to befriend. Example Values:
user_id
optional
The ID of the user for whom to befriend. Example Values:
device
optional
Enable/disable device notifications from the target user. Example Values:
retweets
optional
Enable/disable retweets from the target user. Example Values: |
ログインして登録アプリケーションの一覧を参照してください。
OAuth Signature GeneratorSign in to see a list of your registered applications. |
POST
https://api.twitter.com/1.1/friendships/update.json?user_id=1401881&device=true
Example RequestPOST
|
{
"relationship": {
"target": {
"id_str": "1401881",
"id": 1401881,
"followed_by": true,
"screen_name": "dougw",
"following": true
},
"source": {
"can_dm": true,
"blocking": false,
"id_str": "819797",
"all_replies": false,
"want_retweets": true,
"id": 819797,
"marked_spam": false,
"followed_by": true,
"notifications_enabled": true,
"screen_name": "episod",
"following": true
}
}
}
Example Result
{
"relationship": {
"target": {
"id_str": "1401881",
"id": 1401881,
"followed_by": true,
"screen_name": "dougw",
"following": true
},
"source": {
"can_dm": true,
"blocking": false,
"id_str": "819797",
"all_replies": false,
"want_retweets": true,
"id": 819797,
"marked_spam": false,
"followed_by": true,
"notifications_enabled": true,
"screen_name": "episod",
"following": true
}
}
}
|