POST friendships/update

Updated on Tue, 2013-04-23 07:26

Allows one to enable or disable retweets and device notifications from the specified user.

Resource URL

https://api.twitter.com/1.1/friendships/update.json

Parameters

Providing either screen_name or user_id is required.

screen_name optional

The screen name of the user for whom to befriend.

Example Values: noradio

user_id optional

The ID of the user for whom to befriend.

Example Values: 12345

device optional

Enable/disable device notifications from the target user.

Example Values: true, false

retweets optional

Enable/disable retweets from the target user.

Example Values: true, false

Example Request

POST

https://api.twitter.com/1.1/friendships/update.json

POST Data

user_id=1401881&device=true

  1. {
  2.   "relationship": {
  3.     "target": {
  4.       "id_str": "1401881",
  5.       "id": 1401881,
  6.       "followed_by": true,
  7.       "screen_name": "dougw",
  8.       "following": true
  9.     },
  10.     "source": {
  11.       "can_dm": true,
  12.       "blocking": false,
  13.       "id_str": "819797",
  14.       "all_replies": false,
  15.       "want_retweets": true,
  16.       "id": 819797,
  17.       "marked_spam": false,
  18.       "followed_by": true,
  19.       "notifications_enabled": true,
  20.       "screen_name": "episod",
  21.       "following": true
  22.     }
  23.   }
  24. }