Foursquare api java库出错

时间:2015-06-29 10:54:10

标签: java foursquare

我正在使用this library来调用foursquare api。 Foursquare推荐此库java users

但是返回以下错误:

fi.foyt.foursquare.api.FoursquareApiException:     org.json.JSONException: JSONObject["icon"] not a string.
at fi.foyt.foursquare.api.JSONFieldParser.parseEntity(JSONFieldParser.java:140)
at fi.foyt.foursquare.api.JSONFieldParser.parseValue(JSONFieldParser.java:191)
at fi.foyt.foursquare.api.JSONFieldParser.parseEntity(JSONFieldParser.java:138)
at fi.foyt.foursquare.api.JSONFieldParser.parseEntities(JSONFieldParser.java:57)
at fi.foyt.foursquare.api.FoursquareApi.handleVenueSearchResult(FoursquareApi.java:969)
at fi.foyt.foursquare.api.FoursquareApi.venuesSearch(FoursquareApi.java:1017)

代码如下:

    FoursquareApi foursquareApi = new FoursquareApi("foursquareClientId", "foursquareClientSecret", "foursquareUrlCallBack");
    Map<String, String> mapSearchParam = new HashMap<>();
    mapSearchParam.put("near", "ES");
    mapSearchParam.put("query", query);
    mapSearchParam.put("limit", "50");
    mapSearchParam.put("intent", "global");
    Result<VenuesSearchResult> venuesSearch = null;     
    venuesSearch = foursquareApi.venuesSearch("ES","mercadona",50,null,null,null,null,null);

问题出在哪里?

谢谢!

问题是库未更新:

https://github.com/ganchix/foursquare-api-java/tree/master

0 个答案:

没有答案