[英]twitter4j get tweets by GeoLocation
我有一个任务,我需要使用Geo Location的twitter4j获取推文,有关OAuth和令牌的所有信息我都正确完成,但是当我试图创建查询时,方法geoCode();
了问题geoCode();
在编译过程中出现错误:
Error:(148, 60) java: cannot find symbol
symbol: method geoCode(twitter4j.GeoLocation,double,java.lang.String)
location: class javax.management.Query
我不明白怎么了...
我的查询代码:
double lat = 59.4372155;
double lon = 24.7453688;
double res = 5;
String resUnit = "mi";
QueryResult result = twitter.search(new Query().geoCode(new GeoLocation(lat,lon),res, resUnit));
如果您需要更多代码,请告诉我哪一部分,我将更新帖子
尝试先将其分解并从那里开始:
Query query = new Query().geoCode(new GeoLocation(lat,lon), res, resUnit);
query.count(11); //You can also set the number of tweets to return per page, up to a max of 100
QueryResult result = twitter.search(query);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.