简体   繁体   English

使用新的OAuth使用C#TweetSharp进行更新

[英]Tweet An Update Using C# TweetSharp With New OAuth

I don't suppose anyone has used the latest version of TweetSharp to do a twitter status update, I was using the old version and now getting a bit lost with this OAuth stuff and cannot get it to work. 我不认为有人使用最新版本的TweetSharp进行推特状态更新,我使用旧版本,现在因为这个OAuth的东西而有点迷失,无法让它工作。

I'd just like some example code of using it to do a simple status update? 我只想用一些示例代码来使用它来进行简单的状态更新?

This URL will provide the example you need to get your head around OAuth: http://tweetsharp.codeplex.com/wikipage?title=UserGuide&referringTitle=Documentation 此URL将提供您了解OAuth所需的示例: http//tweetsharp.codeplex.com/wikipage? title = UserGuide& referringTitle=Documentation

From there, there's a method on TwitterService called SendTweet which should be fairly straightforward. 从那里开始,TwitterService上有一个名为SendTweet的方法应该相当简单。 Once you have an access token, you can do it like this: 获得访问令牌后,您可以这样做:

var service = new TwitterService(_consumerKey, _consumerSecret);
service.AuthenticateWith(_accessToken, _accessTokenSecret);
service.SendTweet("I'm totally tweeting!");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM