Do I always need to auth the user everytime i want to grant my app permission to use the user’s twitter account? can i just grant once?
I used the following code..
public ActionResult Authorize()
{
// Step 1 - Retrieve an OAuth Request Token
TwitterService service = new TwitterService("consumerKey", "consumerSecret");
// This is the registered callback URL
OAuthRequestToken requestToken = service.GetRequestToken("http://localhost:9090/AuthorizeCallback");
// Step 2 - Redirect to the OAuth Authorization URL
Uri uri = service.GetAuthorizationUri(requestToken);
return new RedirectResult(uri.ToString(), false /*permanent*/);
}
Nope, you only need to authenticate once, with TweetSharp or any other OAuth-based system, assuming you store the token data you get back from the authorization process. You can then use that to perform any future queries.
I don’t know enough about TweetSharp to post anything specific details about it, but Twitter has a page about their usage of OAuth to help get you started.