Run a search for users similar to the Find People button on Twitter.com; the same results returned by people search on Twitter.com will be returned by using this API.
| C# | Visual Basic |
public static TwitterResponse<TwitterUserCollection> Search( OAuthTokens tokens, string query )
Public Shared Function Search ( _ tokens As OAuthTokens, _ query As String _ ) As TwitterResponse(Of TwitterUserCollection)
- tokens (OAuthTokens)
- The OAuth access tokens.
- query (String)
- The search query.
A TwitterUserCollection instance.
This method interacts with the users/search API endpoint. Documentation can be found here: http://dev.twitter.com/doc/get/users/search
// Declare the search query string query = "from:twit_er_izer @twitterapi"; // Perform the search TwitterResponse<TwitterUserCollection> searchResults = TwitterUser.Search(oauthTokens, query);
'-- Declare the search query Dim Query As String = "from:twit_er_izer @twitterapi" '-- Perform the search Dim searchResults As TwitterResponse(Of TwitterUserCollection) = TwitterUser.Search(oauthTokens, query)
| Exception | Condition |
|---|---|
| ArgumentNullException | Indicates that a required argument was not supplied. |
| ArgumentException | Indicates that an argument supplied was not valid. |
| [!:Twitterizer.CommandValidationException<T>] | Indicates that a command failed pre-execution validation. |