I am doing the following -
TwitterContext twitterCtx = new TwitterContext(auth);
string searchTerm = "\"from:stephenfry\"";
List<Status> searchResponse =
(from search in twitterCtx.Search
where search.Type == SearchType.Search &&
search.Query == searchTerm &&
search.Count == 10 &&
search.SinceID == 0
select search.Statuses)
.SingleOrDefault();
This is working fine and bringing back 10 tweets from the @stephenfry
account. However I am trying to get tweets from my own account, which has publicly accessible tweets (I made sure the Protect my Tweets
checkbox is unchecked in settings/security).
So I then authenticated my application against my own account to get a valid OauthToken
and OauthTokenSecret
so that the twitterCtx
is fully authorised to access all tweets from my account however when I change the searchTerm to -
"\"from:myTwitterAccount\""
still searchResponse
comes back with a count of zero??
It seems to be rather hit or miss as well as I have found other accounts that look to be publicly accessible however when doing the above procedure they aslo return zero posts whereas some work perfectly fine. How can I achieve this?
The Search API only goes back a couple weeks and isn't a comprehensive search engine. Rather, it only display's according to an undocumented Twitter relevance algorithm:
In this case, @stephenfry is a validated account, which implies that Twitter considers the tweets relevant. I'm sure validated account isn't the only criteria, but might shed light on reasoning of why some tweets appear and others don't.
BTW, I think the question is fine and that's why they need multiple votes, to protect against outliers, before truly closing.