Question

I've been trying to use the twitter API 1.1 Linq to Twitter (for c#) to search for tweets at #something.

This is what I came up with:

var query = (from tweet in twitterContext.Search
                  where tweet.Type == SearchType.Search &&
                  tweet.Query == "#something"
                  select tweet).SingleOrDefault();

The problem is that this query only returns 6 statuses and I want to get at least 100. I've tried adding:

tweet.Count == 100

and

tweet.Statuses.Count == 100

with no luck, does anybody know what I am doing wrong?

Was it helpful?

Solution

tweet.Count is correct. Twitter is only returning 6 statuses. Twitter search isn't a normal search engine. Their search algorithm only goes back a certain number of days (undefined), doesn't necessarily return all matches, and won't return results for certain types of queries. You can test by performing the same search at https://twitter.com/search-home.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top