0

I want to use twitter search API version 1.1 to get real time tweets from twitter. And I want to do this in C#. Can anybody guide me in right direction. Some sample code would be of great help for me.

Puneet Pant
  • 918
  • 12
  • 37

1 Answers1

0

Here's how you do it with LINQ to Twitter:

        var twitterCtx = new TwitterContext(...);

        var queryResults =
            from search in twitterCtx.Search
            where search.Type == SearchType.Search &&
                  search.Query == "Linq To Twitter"
            select search;

        Search srch = queryResults.Single();

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