Package weibo4j

Examples of weibo4j.Timeline


public class GetRepostDaily {
  public static void main(String[] args) {
    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      JSONArray status = tm.getRepostDaily();
      Log.logInfo(status.toString());

    } catch (WeiboException e) {
      e.printStackTrace();
    }
View Full Code Here


  public static void main(String[] args) {
    String access_token = args[0];
    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

  public static void main(String[] args) {
    String access_token = args[0];
    String id =  args[1];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      Status status = tm.Repost(id);
      Log.logInfo(status.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

public class GetUserTimelineIds {
  public static void main(String[] args) {
    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

  public static void main(String[] args) {
    String access_token = args[0];
    String id = args[1];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      StatusWapper status = tm.getRepostTimeline(id);
      for(Status s : status.getStatuses()){
        Log.logInfo(s.toString());
      }
      System.out.println(status.getNextCursor());
      System.out.println(status.getPreviousCursor());
View Full Code Here

  public static void main(String[] args) {
    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

  public static void main(String[] args) {
    String access_token = args[0];
    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

        byte[] content= readFileImage("psu.jpg");
        System.out.println("content length:" + content.length);
        ImageItem pic=new ImageItem("pic",content);

        String s=java.net.URLEncoder.encode( args[1],"utf-8");
        Timeline tl = new Timeline();
        Status status=tl.UploadStatus(s, pic);

        System.out.println("Successfully upload the status to ["
            +status.getText()+"].");
      }
      catch(Exception e1){
View Full Code Here

  public static void main(String[] args) {
    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      StatusWapper status = tm.getPublicTimeline();
      for(Status s : status.getStatuses()){
        Log.logInfo(s.toString());
      }
      System.out.println(status.getNextCursor());
      System.out.println(status.getPreviousCursor());
View Full Code Here

  public static void main(String[] args) {
    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      StatusWapper status = tm.getUserTimeline();
      for(Status s : status.getStatuses()){
        Log.logInfo(s.toString());
      }
      System.out.println(status.getNextCursor());
      System.out.println(status.getPreviousCursor());
View Full Code Here

TOP

Related Classes of weibo4j.Timeline

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.