开发者

Tweet An Update Using C# TweetSharp With New OAuth

开发者 https://www.devze.com 2023-01-31 21:23 出处:网络
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.

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.

I'd jus开发者_如何学Ct 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

From there, there's a method on TwitterService called SendTweet which should be fairly straightforward. 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!");
0

精彩评论

暂无评论...
验证码 换一张
取 消