Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/304.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# TweetSharp-始终需要验证(web应用程序)?_C#_Web Applications_Twitter_Oauth_Tweetsharp - Fatal编程技术网

C# TweetSharp-始终需要验证(web应用程序)?

C# TweetSharp-始终需要验证(web应用程序)?,c#,web-applications,twitter,oauth,tweetsharp,C#,Web Applications,Twitter,Oauth,Tweetsharp,每次我想授予应用程序使用该用户twitter帐户的权限时,我是否总是需要对该用户进行身份验证?我能答应你一次吗 我使用了以下代码 public ActionResult Authorize() { // Step 1 - Retrieve an OAuth Request Token TwitterService service = new TwitterService("consumerKey", "consumerSecret"); // This is the r

每次我想授予应用程序使用该用户twitter帐户的权限时,我是否总是需要对该用户进行身份验证?我能答应你一次吗

我使用了以下代码

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*/);
}

不,您只需要使用TweetSharp或任何其他基于OAuth的系统进行一次身份验证,假设您存储了从授权过程中获得的令牌数据。然后,您可以使用它来执行任何未来的查询

我对TweetSharp的了解还不够,无法发布任何关于它的具体细节,但Twitter有一个关于它们的页面,可以帮助您开始