This topic contains the following sections.
All of the following examples assume that your application has already obtained an access token. If not, please visit How Do I?
In every method, you have the opportunity to evaluate the success of every request and, if there is a failure, determine how best to proceed.
TwitterResponse<TwitterUser> userResponse = TwitterUser.Show(tokens, "twitterapi"); if (userResponse.Result == RequestResult.Success) { DisplayUserDetails(userResponse.ResponseObject); } else { LogErrorDetails(userResponse.RequestUrl, userResponse.ErrorMessage, userResponse.Content); DisplayErrorMessageToUser(userResponse.ErrorMessage); }
Dim userResponse As TwitterResponse(Of TwitterUser) = TwitterUser.Show(tokens, "twitterapi") If (userResponse.Result = RequestResult.Success) Then DisplayUserDetails(userResponse.ResponseObject) Else LogErrorDetails(userResponse.RequestUrl, userResponse.ErrorMessage, userResponse.Content) DisplayErrorMessageToUser(userResponse.ErrorMessage) End If
TwitterResponse<TwitterUser> userResponse = TwitterUser.Show("twitterapi");