CsharpTwitt - Search API Methods

Example

Search methods support only JSON and ATOM format.
Requires Authentication : false

Twitter.PublicTwitt pubTwitt = new Twitter.PublicTwitt();
string strResult = "";
XmlDocument xmlResult = null;

strResult= pubTwitt.GetSearchResult("SearchTextAsString", true, Twitter.OutputFormatType.json);

xmlResult = pubTwitt.GetSearchResultAsAtom("SearchTextAsString", true);

Trends methods support only JSON format.
Requires Authentication : false

strResult = pubTwitt.GetTrendsResultAsJSON(Twitter.Trends.trendstype.top);
strResult = pubTwitt.GetTrendsResultAsJSON(Twitter.Trends.trendstype.current);
strResult = pubTwitt.GetTrendsResultAsJSON(Twitter.Trends.trendstype.weekly);
strResult = pubTwitt.GetTrendsResultAsJSON(Twitter.Trends.trendstype.daily);

Comments

Unknown said…
Hello,
I have been trying to return the search results but cant find the way to decode the xml file. Any urgent help will be really appreciated!

Warm Regards,
Anonymous said…
This code below returns a null strResult and thow an exception at xmlResult

strResult = userTwitt.GetHomeTimeline(strUsername, strPassword, Twitter.OutputFormatType.xml);
xmlResult = userTwitt.GetHomeTimelineAsXML(strUsername, strPassword);

Exception...
GetHomeTimelineAsXml supports only XML based formats (XML,Atom)

Any ideas?

Popular posts from this blog

To Move items from one ListBox to another Listbox

Receive Json Web response in C#