You are here

public function Twitter::blocks_create in Twitter 6.5

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

Blocks the specified user from following the authenticating user.

Parameters

mixed $id: The numeric id or screen name of a Twitter user.

array $params: An array of parameters.

See also

https://dev.twitter.com/docs/api/1.1/post/blocks/create

File

./twitter.lib.php, line 1032
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 blocks_create($id, $params = array()) {
  if (is_numeric($id)) {
    $params['user_id'] = $id;
  }
  else {
    $params['screen_name'] = $id;
  }
  $params['image'] = $image;
  return $this
    ->call('blocks/create', $params, 'POST');
}