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.

4

1 回答 1

0

以下是使用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));
于 2013-07-18T20:32:14.073 回答