Package weibo4j.org.json

Examples of weibo4j.org.json.JSONObject


  /*
   * 处理解析后的json解析
   */
  public String ts(String json) {
    try {
      JSONObject jsonObject = new JSONObject(json);
      access_token = jsonObject.getString("oauth_token");
      user_id = jsonObject.getString("user_id");
    } catch (JSONException e) {
      e.printStackTrace();
    }
    return access_token;

View Full Code Here


    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Tags tm = new Tags();
    int tag_id = Integer.parseInt(args[1]);
    try {
      JSONObject result = tm.destoryTag(tag_id);
      Log.logInfo(String.valueOf(result));
    } catch (WeiboException e) {

      e.printStackTrace();
    }
View Full Code Here

    String id = args[1];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      JSONObject mid = tm.QueryMid( 1, id);
        Log.logInfo(mid.toString());     
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      JSONObject ids = tm.getUserTimelineIdsByUid( args[1]);
      Log.logInfo(ids.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      JSONObject status = tm.getFriendsTimelineIds();
      Log.logInfo(status.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }

  }
View Full Code Here

    String mid =  args[1];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();   
    try {
      JSONObject id = tm.QueryId( mid, 1,1);
        Log.logInfo(String.valueOf(id));     
    } catch (WeiboException e) {
      e.printStackTrace();
    }
View Full Code Here

    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      JSONObject ids = tm.getFriendsTimelineIds();
      Log.logInfo(ids.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    String id = args[1];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      JSONObject ids = tm.getRepostTimelineIds(id);
      Log.logInfo(ids.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    String trend_name = args[1];
    Trend tm = new Trend();
    try {
      JSONObject result = tm.isFollow(trend_name);
      Log.logInfo(String.valueOf(result));
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Trend tm = new Trend();
    int trendId = Integer.parseInt(args[1]);
    try {
      JSONObject result = tm.trendsDestroy(trendId);
      Log.logInfo(String.valueOf(result));
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP

Related Classes of weibo4j.org.json.JSONObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.