You are here

public function Twitter::users_search in Twitter 6.5

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

Provides a simple, relevance-based search interface to public user accounts on Twitter.

Parameters

string $query: The search query to run against people search.

array $params: an array of parameters.

Return value

array of TwitterUser objects.

See also

https://dev.twitter.com/docs/api/1.1/get/users/search

File

./twitter.lib.php, line 1125
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 users_search($query, $params = array()) {
  $params['q'] = $query;
  return $this
    ->get_users('users/search', $params);
}