Can someone please write up a quick example code on how to search the public twitter timeline for a specific hashtag or keyword or mention using the Twitterizer framework.
Thanks
Can someone please write up a quick example code on how to search the public twitter timeline for a specific hashtag or keyword or mention using the Twitterizer framework.
Thanks
I'm using this now:
OAuthTokenResponse accessTokenResponse = OAuthUtility.GetAccessToken(consumerKey, consumerSecret, Request.QueryString["oauth_token"],Request.QueryString["oauth_verifier"]);
OAuthTokens tokens = new OAuthTokens();
tokens.AccessToken = accessTokenResponse.Token;
tokens.AccessTokenSecret = accessTokenResponse.TokenSecret;
tokens.ConsumerKey = consumerKey;
tokens.ConsumerSecret = consumerSecret;
TwitterResponse<TwitterSearchResultCollection> tr = TwitterSearch.Search("your query");
TwitterSearchResultCollection results= tr.ResponseObject;
List<TwitterSearchResult> resultList= results.ToList();
I hope this can still help someone.
You should use the search API to search for a specific word or phrase.
In Twitterizer, it would look like: