本文整理汇总了C#中Twitter类的典型用法代码示例。如果您正苦于以下问题:C# Twitter类的具体用法?C# Twitter怎么用?C# Twitter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Twitter类属于命名空间,在下文中一共展示了Twitter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: imgly
public imgly(Twitter twitter, TwitterConfiguration twitterConfig)
{
this.tw = twitter;
this.twitterConfig = twitterConfig;
this.imglyApi = new ImglyApi(twitter.Api);
}
示例2: yfrog
public yfrog(Twitter twitter, TwitterConfiguration twitterConfig)
{
this.tw = twitter;
this.twitterConfig = twitterConfig;
this.yfrogApi = new YfrogApi(twitter.Api);
}
示例3: TwitPic
public TwitPic(Twitter twitter, TwitterConfiguration twitterConfig)
{
this.tw = twitter;
this.twitterConfig = twitterConfig;
this.twitpicApi = new TwitpicApi(twitter.AccessToken, twitter.AccessTokenSecret);
}
示例4: Imgur
public Imgur(Twitter tw, TwitterConfiguration twitterConfig)
{
this.twitter = tw;
this.twitterConfig = twitterConfig;
this.imgurApi = new ImgurApi();
}
示例5: yfrog
public yfrog(Twitter twitter, TwitterConfiguration twitterConfig)
{
this.tw = twitter;
this.twitterConfig = twitterConfig;
this.yfrogApi = new YfrogApi(twitter.AccessToken, twitter.AccessTokenSecret);
}
示例6: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
string userName = "simonbegg";
string password = "techn0l0gy";
DataSet ds = new DataSet();
Twitter twitter = new Twitter();
XmlDocument xmlDoc = twitter.GetUserTimelineAsXML(userName, password, "simonbegg", Twitter.OutputFormatType.XML);
var query = (from c in xmlDoc.DocumentElement.ChildNodes.Cast<XmlNode>()
select c.SelectSingleNode("text").InnerXml).Take(2);
XmlTextReader xtr = new XmlTextReader(new StringReader(xmlDoc.OuterXml));
XElement xe = XElement.Load(xtr);
string tweets = String.Empty;
var foo = (from c in xe.Elements("status")
select c.Element("text")).First();
foreach (string tweet in query)
tweets += tweet + "<br />";
this.litTweet.Text = foo.ToString();
this.litTweetHeader.Text = "Latest tweets from talamh";
}
示例7: templeHead
public void templeHead(string URL,Twitter.API.TwitterUser user)
{
StartCoroutine(setAvatar(URL, null));
GameObject temp = GameObject.FindGameObjectWithTag("Base");
Debug.Log(temp.name);
temp.GetComponent<temple>().thisUser = user;
}
示例8: imgly
public imgly(Twitter twitter, TwitterConfiguration twitterConfig)
{
this.tw = twitter;
this.twitterConfig = twitterConfig;
this.imglyApi = new ImglyApi(twitter.AccessToken, twitter.AccessTokenSecret);
}
示例9: MainPage
// Constructor
public MainPage()
{
InitializeComponent();
Twitter = new Twitter();
App.TweetListVM = new TweetListViewModel();
this.DataContext = App.TweetListVM;
App.TweetListVM.LoadData();
}
示例10: Imgur
public Imgur(Twitter tw)
{
this._twitter = tw;
Initialize(ApplicationSettings.TwitterConsumerKey, ApplicationSettings.TwitterConsumerSecret,
tw.AccessToken, tw.AccessTokenSecret,
"", "");
}
示例11: CreateDirectServices
void CreateDirectServices()
{
// create direct services to social networks
_twitter = new Twitter();
_sinaWeibo = new SinaWeibo();
//TODO: init facebook with your app ID and an array of permissions
_facebook = new Facebook();
_facebook.Init("1234567890", new string[] {"read_stream", "email", "publish_stream"});
}
示例12: TwipplePhoto
public TwipplePhoto(Twitter twitter)
: base(new Uri("http://api.twitter.com/"), new Uri("https://api.twitter.com/1.1/account/verify_credentials.json"))
{
if (twitter == null)
throw new ArgumentNullException("twitter");
_twitter = twitter;
Initialize(ApplicationSettings.TwitterConsumerKey, ApplicationSettings.TwitterConsumerSecret,
_twitter.AccessToken, _twitter.AccessTokenSecret,
"", "");
}
示例13: Filterize
public Filterize(Twitter.Status input, string query)
{
this.Input = input;
this.Query = query;
this.Filters = new Hashtable();
//this.Filters["text"] = new Filters.Text.Text(this.Input);
//this.Filters["name"] = new Filters.Text.Name(this.Input);
//this.Filters["screen_name"] = new Filters.Text.ScreenName(this.Input);
//this.Filters["favorite_count"] = new Filters.Numerical.FavoriteCount(this.Input);
}
示例14: Main
static void Main(string[] args)
{
String ini;
if (args.Length < 1) {
Console.WriteLine("Please enter the name of the ini file");
ini = Console.ReadLine();
}
else
ini = args[0];
Console.WriteLine(ini);
var twit = new Twitter(ini);
//twit.testStream();
var testCount = 100;
twit.populateData(testCount);
while (twit.Data.Count() < testCount - 1) {
Console.WriteLine(twit.Data.Count());
System.Threading.Thread.Sleep(5000);
}
twit.writeDateToFile(@"C:\Users\Kevin\Documents\TestJson\data.txt");
//twit.testStream("Disney");
Tweets data = new Tweets();
JsonSerializer serializer = new JsonSerializer();
serializer.NullValueHandling = NullValueHandling.Ignore;
using (StreamReader sr = new StreamReader(@"C:\Users\Kevin\Documents\TestJson\data.txt"))
using (JsonTextReader jr = new JsonTextReader(sr)) {
if(!jr.Read() || jr.TokenType != JsonToken.StartArray) {
throw new Exception("Expected start of array");
}
while (jr.Read()) {
if (jr.TokenType == JsonToken.EndArray) break;
var item = serializer.Deserialize<TweetData>(jr);
data.add(item);
}
}
Console.WriteLine("done");
foreach (var tweet in data) {
Console.WriteLine(tweet.text);
}
//twit.getData();
//while (twit.Data.Length <= 1) ;
//Console.WriteLine(twit.Data+"\n");
//Twitter.testStream(ini);
var news = new News();
news.getGoogleNews("Disney");
foreach (var article in news.Data) {
Console.WriteLine(article.Title+" "+article.publishData.ToString() );
}
Console.WriteLine("Done with everything");
Console.ReadLine();
}
示例15: Mobypicture
public Mobypicture(Twitter twitter, TwitterConfiguration twitterConfig)
{
if (twitter == null)
throw new ArgumentNullException(nameof(twitter));
if (twitterConfig == null)
throw new ArgumentNullException(nameof(twitterConfig));
this.twitter = twitter;
this.twitterConfig = twitterConfig;
this.mobypictureApi = new MobypictureApi(twitter.AccessToken, twitter.AccessTokenSecret);
}