LinqToTwitter 授权帮助
我正在使用 LinqToTwitter (http://linqtotwitter.codeplex.com/),但是 我不知道从哪里开始授权的事情。到目前为止,我的想法是:
var oAuth = new OAuthTwitter ();
oAuth.OAuthConsumerKey ="mykey";
oAuth.OAuthConsumerSecret ="mySecret" ;
string loginUrl = oAuth.AuthorizationLinkGet(
"https://api.twitter.com/oauth/request_token" ,
"https://api.twitter.com/oauth/authorize", "", true );
var twitterCtx = new TwitterContext ();
//return Redirect(loginUrl); //(ASP.NET)
var publicTweets = from tweet in twitterCtx.Status
where tweet.Type == StatusType .Public
select tweet; publicTweets.ToList().ForEach(tweet => AddItem(tweet.User.Name, tweet.Text));
我只想以最快、最简单的方式授权桌面应用程序。我找不到太多文档。
仅供参考 - 这不适用于多个用户...我将拥有一个始终使用的用户名和密码...如果这有助于使其变得更简单。
非常感谢
I am using LinqToTwitter (http://linqtotwitter.codeplex.com/), but
I haven't a clue about where to start with the authorization thing. So far I have this:
var oAuth = new OAuthTwitter ();
oAuth.OAuthConsumerKey ="mykey";
oAuth.OAuthConsumerSecret ="mySecret" ;
string loginUrl = oAuth.AuthorizationLinkGet(
"https://api.twitter.com/oauth/request_token" ,
"https://api.twitter.com/oauth/authorize", "", true );
var twitterCtx = new TwitterContext ();
//return Redirect(loginUrl); //(ASP.NET)
var publicTweets = from tweet in twitterCtx.Status
where tweet.Type == StatusType .Public
select tweet; publicTweets.ToList().ForEach(tweet => AddItem(tweet.User.Name, tweet.Text));
I just want the quickest, simplest way of authorizing the desktop app. I couldn't find much documentation.
FYI - This won't be for multiple users... I will have a single user name and password that will always be used... if that helps make it simpler.
Many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个工作示例:
Here is a working example: