当前位置: 首页>>代码示例>>C#>>正文


C# Twitter类代码示例

本文整理汇总了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);
        }
开发者ID:opentween,项目名称:OpenTween,代码行数:7,代码来源:imgly.cs

示例2: yfrog

        public yfrog(Twitter twitter, TwitterConfiguration twitterConfig)
        {
            this.tw = twitter;
            this.twitterConfig = twitterConfig;

            this.yfrogApi = new YfrogApi(twitter.Api);
        }
开发者ID:upsilon,项目名称:OpenTween,代码行数:7,代码来源:yfrog.cs

示例3: TwitPic

        public TwitPic(Twitter twitter, TwitterConfiguration twitterConfig)
        {
            this.tw = twitter;
            this.twitterConfig = twitterConfig;

            this.twitpicApi = new TwitpicApi(twitter.AccessToken, twitter.AccessTokenSecret);
        }
开发者ID:nanayaT,项目名称:OpenTween,代码行数:7,代码来源:TwitPic.cs

示例4: Imgur

        public Imgur(Twitter tw, TwitterConfiguration twitterConfig)
        {
            this.twitter = tw;
            this.twitterConfig = twitterConfig;

            this.imgurApi = new ImgurApi();
        }
开发者ID:opentween,项目名称:OpenTween,代码行数:7,代码来源:Imgur.cs

示例5: yfrog

        public yfrog(Twitter twitter, TwitterConfiguration twitterConfig)
        {
            this.tw = twitter;
            this.twitterConfig = twitterConfig;

            this.yfrogApi = new YfrogApi(twitter.AccessToken, twitter.AccessTokenSecret);
        }
开发者ID:nezuku,项目名称:OpenTween,代码行数:7,代码来源:yfrog.cs

示例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";
    }
开发者ID:simonbegg,项目名称:LiveFreeRange,代码行数:29,代码来源:Twitter.ascx.cs

示例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;
 }
开发者ID:GibletsofJesus,项目名称:Advanced-Tech-3,代码行数:7,代码来源:twitterButton.cs

示例8: imgly

        public imgly(Twitter twitter, TwitterConfiguration twitterConfig)
        {
            this.tw = twitter;
            this.twitterConfig = twitterConfig;

            this.imglyApi = new ImglyApi(twitter.AccessToken, twitter.AccessTokenSecret);
        }
开发者ID:betarium,项目名称:OpenTweenXP,代码行数:7,代码来源:imgly.cs

示例9: MainPage

 // Constructor
 public MainPage()
 {
     InitializeComponent();
     Twitter = new Twitter();
     App.TweetListVM = new TweetListViewModel();
     this.DataContext = App.TweetListVM;
     App.TweetListVM.LoadData();
 }
开发者ID:Vintharas,项目名称:WP7projects,代码行数:9,代码来源:MainPage.xaml.cs

示例10: Imgur

        public Imgur(Twitter tw)
        {
            this._twitter = tw;

            Initialize(ApplicationSettings.TwitterConsumerKey, ApplicationSettings.TwitterConsumerSecret,
                       tw.AccessToken, tw.AccessTokenSecret,
                       "", "");
        }
开发者ID:Mitsui,项目名称:OpenTween,代码行数:8,代码来源:Imgur.cs

示例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"});
    }
开发者ID:BiDuc,项目名称:u3dxt,代码行数:10,代码来源:SocialTest.cs

示例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,
                       "", "");
        }
开发者ID:Mitsui,项目名称:OpenTween,代码行数:11,代码来源:TwipplePhoto.cs

示例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);
        }
开发者ID:syuilo,项目名称:Twitch,代码行数:11,代码来源:Filterize.cs

示例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();
        }
开发者ID:karashak1,项目名称:ThesisProject,代码行数:54,代码来源:Main.cs

示例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);
        }
开发者ID:nezuku,项目名称:OpenTween,代码行数:12,代码来源:Mobypicture.cs


注:本文中的Twitter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。