Twitter4j reverseGeoCode() 在 android 中抛出 TwitterException



列表项

 public ResponseList<Place> reverseGeoTwitter(GeoLocation location)
    {
        try {
            GeoQuery query=new GeoQuery(location);
            query.setMaxResults(10);            
            return mTwitter.reverseGeoCode(query);              
        } catch (TwitterException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            return null;
        }       
}

日志:

10-12 06:24:19.459: W/System.err(5440): A JSONObject text must begin with '{' found:H at 2 [character 3 line 1]Relevant discussions can be found on the Internet at:
10-12 06:24:19.459: W/System.err(5440):     http://www.google.co.jp/search?q=2cfd0217 or
10-12 06:24:19.459: W/System.err(5440):     http://www.google.co.jp/search?q=02da4ed7
10-12 06:24:19.459: W/System.err(5440): TwitterException{exceptionCode=[2cfd0217-02da4ed7 0e78b021-b581e11a], statusCode=-1, retryAfter=-1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.6}
10-12 06:24:19.459: W/System.err(5440):     at twitter4j.internal.http.HttpResponse.asJSONObject(HttpResponse.java:160)
10-12 06:24:19.459: W/System.err(5440):     at twitter4j.internal.json.PlaceJSONImpl.createPlaceList(PlaceJSONImpl.java:144)
10-12 06:24:19.459: W/System.err(5440):     at twitter4j.internal.json.z_T4JInternalJSONImplFactory.createPlaceList(z_T4JInternalJSONImplFactory.java:230)
10-12 06:24:19.459: W/System.err(5440):     at twitter4j.TwitterImpl.reverseGeoCode(TwitterImpl.java:1599)
10-12 06:24:19.459: W/System.err(5440):     at com.Twitter.TwitterApp.reverseGeoTwitter(TwitterApp.java:376)

Twitter Web 服务是 json 的一个很好的例子,它总是以"{"开头。 所以首先检查你的网络服务响应,你的网络服务响应不正确,不是以"{"开头的。请检查一下。

相关内容

  • 没有找到相关文章

最新更新