Retrieving results from a search object to search on twitter

I use linq-to-twitter, and I want to pass a tag to search and collect data (text, username, user image. I can return the search object, but I want to go further to find the text, and the documents say that the object The search box has a result field, which is a list of SearchEntities, but it doesn’t appear to me, I got red lines below it for both of the following cases:

Case 1:

        using (var twitterCtx = new TwitterContext())
                    {
                      var searchResults =
                         (from search in twitterCtx.Search
                         where search.Type == SearchType.Search &&
                             search.Query == tag &&
                             search.IncludeEntities == true
                         select search)
                        .SingleOrDefault();

                        searchResults.Results.ForEach(entry =>
                        {
                            ....

and case 2: (I just entered it for a quick example)

var latestTweets= (from tweet in twitterCtx.Search
               where tweet.Count == 200 &&
                     tweet.Hashtag.Contains(tag)
               select tweet).Take(20);


              foreach (var tweet in latestTweets)
              {
                  foreach(var tweet2 in tweet.Result)

.Result just doesn't show up ... EDIT: API doc

+2
source share
1 answer

. -, LING to Twitter Twitter API v1.1, , , Search, . , OAuth LINQ to Twitter . Sample .

, , , Twitter . , . , Search , , LINQ to Twitter. .

, - LINQ to Twitter, HTTP- Fiddler . : , .

, , Contains, . LINQ to Twitter , , Twitter. , Twitter, LINQ to Objects. , API Twitter , , , .

@JoeMayo

+2

Source: https://habr.com/ru/post/1666507/


All Articles