[英]twitter4j get tweets by GeoLocation
I have a task, where I need to get tweets using twitter4j by Geo Location, everything about OAuth and tokens I did correctly, but when I'm trying to create a query getting a problem with method geoCode();
我有一个任务,我需要使用Geo Location的twitter4j获取推文,有关OAuth和令牌的所有信息我都正确完成,但是当我试图创建查询时,方法
geoCode();
了问题geoCode();
During compilation process I'm getting an error : 在编译过程中出现错误:
Error:(148, 60) java: cannot find symbol
symbol: method geoCode(twitter4j.GeoLocation,double,java.lang.String)
location: class javax.management.Query
I don't understand what is going wrong... 我不明白怎么了...
My Query code: 我的查询代码:
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));
If you need any more code, please tell me which part, I will UPDATE the Post 如果您需要更多代码,请告诉我哪一部分,我将更新帖子
Try to break it down first and work from there: 尝试先将其分解并从那里开始:
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.