C# Class Smrf.SocialNetworkLib.Twitter.oAuthTwitter

Inheritance: OAuthBase
Mostra file Open project: 2014-sed-team3/term-project Class Usage Examples

Public Methods

Method Description
AccessTokenGet ( string authToken, string verifier ) : void

Exchange the request token for an access token.

AuthorizationLinkGet ( ) : string

Get the link to Twitter's authorization page for this application.

ConstructAuthWebRequest ( Method method, string url, string postData, String &authorizedUrl, String &authorizedPostData ) : void

Constructs the URL and POST data to use for a web request using oAuth.

WebRequest ( Method method, string url, string postData ) : string

Web Request Wrapper

WebResponseGet ( HttpWebRequest webRequest ) : string

Process the web response.

oAuthTwitter ( String userAgent, Int32 timeoutMs ) : System
oAuthWebRequest ( Method method, string url, string postData ) : string

Submit a web request using oAuth.

Method Details

AccessTokenGet() public method

Exchange the request token for an access token.
public AccessTokenGet ( string authToken, string verifier ) : void
authToken string The oauth_token is supplied by Twitter's authorization page following the callback.
verifier string
return void

AuthorizationLinkGet() public method

Get the link to Twitter's authorization page for this application.
public AuthorizationLinkGet ( ) : string
return string

ConstructAuthWebRequest() public method

Constructs the URL and POST data to use for a web request using oAuth.
public ConstructAuthWebRequest ( Method method, string url, string postData, String &authorizedUrl, String &authorizedPostData ) : void
method Method GET or POST
url string The full url, including the querystring.
postData string Data to post (querystring format)
authorizedUrl String The url with authorization information added.
authorizedPostData String The POST data with authorization information added.
return void

WebRequest() public method

Web Request Wrapper
public WebRequest ( Method method, string url, string postData ) : string
method Method Http Method
url string Full url to the web resource
postData string Data to post in querystring format
return string

WebResponseGet() public method

Process the web response.
public WebResponseGet ( HttpWebRequest webRequest ) : string
webRequest System.Net.HttpWebRequest The request object.
return string

oAuthTwitter() public method

public oAuthTwitter ( String userAgent, Int32 timeoutMs ) : System
userAgent String
timeoutMs System.Int32
return System

oAuthWebRequest() public method

Submit a web request using oAuth.
public oAuthWebRequest ( Method method, string url, string postData ) : string
method Method GET or POST
url string The full url, including the querystring.
postData string Data to post (querystring format)
return string