由网友(与喜欢之人做欢喜之事)分享简介:难道任何机构提供给我的步骤验证Twitter的API V1.1的(手段提供给我的步骤code)对于C#.NET。Could any body provide me steps of authenticated twitter api V1.1 (means provide me steps of code) for...
难道任何机构提供给我的步骤验证Twitter的API V1.1的(手段提供给我的步骤code)对于C#.NET。
Could any body provide me steps of authenticated twitter api V1.1 (means provide me steps of code) for C#.NET.
推荐答案
我也跟着tweetsharp API的https:// github上.COM / danielcrenna / tweetsharp 张贴鸣叫支持API V1.1。
I followed tweetsharp API "https://github.com/danielcrenna/tweetsharp" for posting tweet which support API V1.1.
使用库包管理器和运行命令PM>安装,包TweetSharp包管理器控制台上。
Use library package manager and run command "PM> Install-Package TweetSharp " on package manger console .
var _consumerKey = ConfigurationManager.AppSettings["twitterConsumerKey"].ToString();
var _consumerSecret = ConfigurationManager.AppSettings["twitterConsumerSecret"].ToString();
var _accessToken = ConfigurationManager.AppSettings["twitterAccess"].ToString();
var _accessTokenSecret = ConfigurationManager.AppSettings["twitterAccessSecret"].ToString();
var service = new TwitterService(_consumerKey, _consumerSecret);
service.AuthenticateWith(_accessToken, _accessTokenSecret);
var status = "Collaborative short story of the day: Blah";
var response = service.SendTweet(new SendTweetOptions() { Status = status });
相关推荐
最新文章