public AcquireRequestToken ( string uri, string method, string user_agent ) : |
||
uri | string | |
method | string | |
user_agent | string | |
Résultat |
To use this method, first instantiate a new Oauth.Manager object, then set the callback param (oauth["callback"]='oob'). After the call returns, you should direct the user to open a browser window to the authorization page for the OAuth-enabled service. Or, you can automatically open that page yourself. Do this with System.Diagnostics.Process.Start(), passing the URL of the page. There should be one query param: oauth_token with the value obtained from oauth["token"].
According to the OAuth spec, you need to do this only ONCE per application. In other words, the first time the application is run. The normal oauth workflow is: (1) get a request token, (2) use that to acquire an access token (which requires explicit user approval), then (3) using that access token, invoke protected services. The first two steps need to be done only once per application.
For Twitter, at least, you can cache the access tokens indefinitely; Twitter says they never expire. However, other oauth services may not do the same. Also: the user may at any time revoke his authorization for your app, in which case you need to perform the first 2 steps again.
public AcquireRequestToken ( string uri, string method, string user_agent ) : |
||
uri | string | |
method | string | |
user_agent | string | |
Résultat |