2013-07-18 95 views

回答

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)); 
相關問題