How to I get tweets based on #tag

May 9, 2013 at 8:35 AM
May I know how to how can I extract tweets given a #tag?
Please advise.
Thanks in advance.
May 9, 2013 at 2:30 PM
Edited May 9, 2013 at 2:34 PM

You can do a Search query. There's an example on LINQ to Twitter's Home page too. It might look something like this:
            var twitterCtx = new TwitterContext(...);

            var queryResults =
                from search in twitterCtx.Search
                where search.Type == SearchType.Search &&
                      search.Query == "#tag"
                select search;

            Search srch = queryResults.Single();

            Console.WriteLine("\nQuery: {0}\n", srch.QueryResult);
            srch.Statuses.ForEach(entry =>
                    "ID: {0, -15}, Source: {1}\nContent: {2}\n",
                    entry.StatusID, entry.Source, entry.Text));