Пример #1
0
        public void Search(Action <TweetDto, string> _Update, string _Connection, List <string> tracks, bool enableLocation)
        {
            cancellationToken = new CancellationTokenSource();
            Connection        = _Connection;
            regex             = new Regex(@"(?<=#)\w+");
            Login();
            Update      = _Update;
            GetLocation = new OpenStreetMapHelper();
            TweetinviConfig.CurrentThreadSettings.TweetMode = TweetMode.Extended;
            Task.Factory.StartNew(async() => await TweetAnalysis(), cancellationToken.Token);
            var tweets = Tweetinvi.Search.SearchTweets(new Tweetinvi.Parameters.SearchTweetsParameters(tracks[0])
            {
                TweetSearchType = Tweetinvi.Parameters.TweetSearchType.OriginalTweetsOnly,
                Filters         = Tweetinvi.Parameters.TweetSearchFilters.Hashtags,
                SearchType      = SearchResultType.Popular
            });

            foreach (var tweet in tweets)
            {
                Tweets.Push(tweet);
            }
        }