【发布时间】:2016-08-09 01:31:26
【问题描述】:
我正在尝试在特定位置获取推文。我为此使用 TweetSharp。我尝试了以下代码:
// Pass your credentials to the service
TwitterService service = new TwitterService("xx", "xx");
// Step 4 - User authenticates using the Access Token
service.AuthenticateWith("xx-xx", "xx");
TwitterGeoLocationSearch geoSearch = new TwitterGeoLocationSearch(39.56, 32.52, 500, TwitterGeoLocationSearch.RadiusType.Km);
//IEnumerable<TwitterStatus> mentions = service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions());
var tweets = service.Search(new SearchOptions() { Q = "ankara", Count = 30, Geocode = geoSearch });
但 tweets.Statuses 返回空。如果我从 SearchOptions 中删除 Geocode 部分,我可以获得结果。但我想在特定位置半径内获取推文。
【问题讨论】:
-
service.Response 是否显示状态代码、原因短语或内容正文中的任何错误详细信息?
标签: c# asp.net twitter tweetsharp