I am trying to find trending tweets number by each city in Turkey. but “TwitterGeoLocationSearch” result return zero . I am using TweetSharp 2.0 and visual studio 2010.
Please check my code block. Here:
private void btnTweetSearch_Click(object sender, EventArgs e)
{
service = new TwitterService("xxxx", "xxxxx", "xxxxxxx", "xxxxxxxx");
var CityGeoCode = new TwitterGeoLocationSearch(37.0000000, 35.3213330, 10, TwitterGeoLocationSearch.RadiusType.Km);
var tweetss = service.Search(new SearchOptions { Q = " Turkey ", Count = 1000, Geocode = CityGeoCode });
int top = 1;
var TweetwithGeo = tweetss.Statuses.Where(x => x.Location != null );
foreach (var tweet in TweetwithGeo)
{
TimeSpan diff = (DateTime.Now).Subtract(tweet.CreatedDate.ToLocalTime());
int control = Convert.ToInt32(diff.TotalMinutes);
if (control <= 150)
{
top++;
lbTweetWindow.Items.Add(tweet.Text);
lbtweettime.Items.Add(Convert.ToString(tweet.CreatedDate.ToLocalTime()));
}
}
lbltop.Text = Convert.ToString(top);
}
}
Any help would be very much appreciated. Thanks a lot…