This project has moved and is read-only. For the latest updates, please go here.

Search parameters

Nov 22, 2012 at 8:55 PM
Edited Nov 22, 2012 at 8:56 PM

Hi there,

after the recent update I am experiencing issues with the parameters when searching for tweets. The Attitude and Geocode option seem to be broken.

My code looks as follows:

var queryResults = (
                    from search in twitterCtx.Search
                    where search.Type == SearchType.Search &&
                        search.Query == options.query &&
                        search.MaxID == 0 &&
                        checkBoxLanguage.Checked ? search.SearchLanguage == options.lang : true &&
                        checkBoxUntil.Checked ? search.Until == Convert.ToDateTime(options.until) : true &&
                        checkBoxSince.Checked ? search.Since == Convert.ToDateTime(options.since) : true &&
                        checkBoxGeocode.Checked ? search.GeoCode == options.geocode : true &&
                        checkBoxAttitude.Checked ? search.Attitude == options.attitude : true &&
                        checkBoxResultType.Checked ? search.ResultType == options.resultType : true &&
                        search.Count == options.count
                    select search);
Nov 25, 2012 at 3:07 AM


I've been looking closer at this and can see there's a problem with the Attitude parameter. I recently updated LINQ to Twitter to Twitter API v1.1, and the advanced parameters aren't documented the way I'm trying to use them. Anytime something is undocumented, it normally means that Twitter doesn't want people to use it that way - so, I probably need to remove filters for the undocumented options.

The work-around for advanced options is to include them in the Query. Here's Twitter's search page, you can click on operators to see how to include them.

That said, geocode is a documented parameter and should work. I ran it myself, but can't figure out whether the results are correct because the statuses don't have coordinates. I'm curious what you're referring to when you say GeoCode doesn't work?



Nov 25, 2012 at 12:41 PM

Thanks for the reply!

So the use of the attitude function is depreciated due to missing documentation on twitter's end. That's not a big issue, it wasn't that useful anyways. 

I managed to resolve the issue with the geocode parameter, it seemed that it was an issue with my code. I'm very sorry for any inconvenience caused.