• 新浪微博 oauth1.0分页 获取好友


    http://api.t.sina.com.cn/statuses/followers/『uid』.json?source=1610801709&&cursor=1&&count=10

    Response response = weibo.getFollowers2();
    
                    // System.out.println(response);
    
                    String str = response.asString();
    
                    // System.out.println(str);
    
                    JSONObject jo = new JSONObject(str);
                    JSONArray asonArray = jo.getJSONArray("users");
    
                    for (int i = 0; i < asonArray.length(); i++) {
                        Object o = asonArray.get(i);
                        JSONObject jo1 = (JSONObject) o;
    
                        System.out.println(jo1.getString("id"));
                    }
    
                    int next_cursor = jo.getInt("next_cursor");
                    System.out.println(next_cursor);
    
                    int previous_cursor = jo.getInt("previous_cursor");
                    System.out.println(previous_cursor);
    

      

    public Response getFollowers2() throws WeiboException {
            return http.get(getBaseURL() + "statuses/followers/【uid】.json?source=1610801709&&cursor=-1&&count=10", false);
        }
    

      

  • 相关阅读:
    1-29反射
    1-28Map简介
    1-27TreeSet简介
    1-26HashSet简介
    1-25泛型
    1-24List三个子类的特点
    1-23集合概述
    Java接口
    1-22日期类型
    简易计算器的实现
  • 原文地址:https://www.cnblogs.com/hitwtx/p/2314882.html
Copyright © 2020-2023  润新知