You are here

public function Twitter::friendships_destroy in Twitter 6.5

Same name and namespace in other branches
  1. 7.6 twitter.lib.php \Twitter::friendships_destroy()
  2. 7.5 twitter.lib.php \Twitter::friendships_destroy()

Allows the authenticating user to unfollow the user specified in the ID parameter.

Parameters

mixed $id: The user ID or the screen name.

Return value

The unfollowed user in the requested format when successful, or a string describing the failure condition when unsuccessful.

See also

https://dev.twitter.com/docs/api/1.1/post/friendships/destroy

File

./twitter.lib.php, line 781
Integration layer to communicate with the Twitter REST API 1.1. https://dev.twitter.com/docs/api/1.1

Class

Twitter
Primary Twitter API implementation class

Code

public function friendships_destroy($id) {
  $params = array();
  if (is_numeric($id)) {
    $params['user_id'] = $id;
  }
  else {
    $params['screen_name'] = $id;
  }
  return $this
    ->call('friendships/destroy', $params, 'POST');
}