• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Twitter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Twitter的典型用法代码示例。如果您正苦于以下问题:C# Twitter类的具体用法?C# Twitter怎么用?C# Twitter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Twitter类属于命名空间,在下文中一共展示了Twitter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: TwipplePhoto

        public TwipplePhoto(Twitter twitter, TwitterConfiguration twitterConfig)
        {
            if (twitter == null)
                throw new ArgumentNullException("twitter");
            if (twitterConfig == null)
                throw new ArgumentNullException("twitterConfig");

            this.twitter = twitter;
            this.twitterConfig = twitterConfig;

            this.twippleApi = new TwippleApi(twitter.AccessToken, twitter.AccessTokenSecret);
        }
开发者ID:betarium,项目名称:OpenTweenXP,代码行数:12,代码来源:TwipplePhoto.cs


示例17: Main

        /// <summary>
        /// Defines the program entry point. 
        /// </summary>
        /// <param name="args">An array of <see cref="T:System.String"/> containing command line parameters.</param>
        private static void Main(string[] args)
        {
            if (args.Length == 0)
                return;

            string userName = args[0];
            Twitter twitter = new Twitter();
            var messages = twitter.GetMessages(userName);

            foreach (var msg in messages)
                Console.WriteLine(msg.Text);
        }
开发者ID:kodefuguru,项目名称:Presentations,代码行数:16,代码来源:Program.cs


示例18: FollowEventView

        public FollowEventView(Contact source, Contact target, TwitterClient twitterClient, Twitter tw)
        {
            InitializeComponent();
            Source = source;
            Target = target;

            DataContext = this;

            this.twitterClient = twitterClient;
            t = tw;
            _eventAggregator = CompositionManager.Get<IEventAggregator>();
        }
开发者ID:nickhodge,项目名称:MahTweets.LawrenceHargrave,代码行数:12,代码来源:FollowEventView.xaml.cs


示例19: TwipplePhoto

        public TwipplePhoto(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.twippleApi = new TwippleApi(twitter.Api);
        }
开发者ID:opentween,项目名称:OpenTween,代码行数:12,代码来源:TwipplePhoto.cs


示例20: Main

        static void Main(string[] args)
        {
            List<string> terms = new List<string>();
            var options = new Options();
            var result = CommandLine.Parser.Default.ParseArguments(args, options);

            var twit = new Twitter(options.ini);
            Console.WriteLine("Connected to twitter");
            var news = new News();
            string date = DateTime.Now.ToString("M-d-yyyy");
            if (!Directory.Exists(options.twitterStore + date)) {
                Directory.CreateDirectory(options.twitterStore + date);
            }
            if (!Directory.Exists(options.newsStore + date)) {
                Directory.CreateDirectory(options.newsStore + date);
            }
            //TODO do the same for the news articles

            string time = DateTime.Now.ToString("HHmmss");

            foreach (var x in options.terms) {
                string path = options.twitterStore +date;
                string fileName = time+"-"+x+".txt";
                string file = Path.Combine(path, fileName);
                twit.populateData(x, options.tweetCount);
                while (twit.Data.Count() < options.tweetCount - 1) {
                    System.Threading.Thread.Sleep(5000);
                    Console.WriteLine("Topic:"+x +" count="+twit.Data.Count());
                }
                Console.WriteLine("Collection for " + x + " done, writing to file.");
                twit.writeDateToFile(file);
                Console.WriteLine("Writing file done");
            }

            Console.WriteLine("collecting generic data");
            twit.populateData(1000);
            while (twit.Data.Count() < 1000 - 1) {
                System.Threading.Thread.Sleep(5000);
                Console.WriteLine("Count=" + twit.Data.Count());
            }
            twit.writeDateToFile(Path.Combine(options.twitterStore+date, time+".txt"));
            foreach (var x in options.terms) {
                string path = options.newsStore + date;
                string fileName = time + "-" + x + ".txt";
                string file = Path.Combine(path, fileName);
                news.getGoogleNews(x);
                news.writeDateToFile(file);
            }
            Console.WriteLine("Collection Done");
            Console.ReadLine();
        }
开发者ID:karashak1,项目名称:ThesisProject,代码行数:51,代码来源:Program.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TwitterDataModel类代码示例发布时间:2022-05-24
下一篇:
C# TwilioResponse类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap