Package weibo4j

Examples of weibo4j.Timeline


public class GetMentions {

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


import weibo4j.model.WeiboException;

public class GetCommentsDaily {
  public static void main(String[] args) {
    String access_token = args[0];
    Timeline tm = new Timeline();
    tm.client.setToken(access_token);
    try {
      JSONArray status = tm.getCommentsDaily();
      Log.logInfo(status.toString());

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

import weibo4j.model.WeiboException;

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

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

public class QueryMid {

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

public class Repost {

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

import weibo4j.model.WeiboException;

public class GetUserTimelineIds {
  public static void main(String[] args) {
    String access_token = args[0];
    Timeline tm = new Timeline();
    tm.client.setToken(access_token);
    try {
      JSONObject ids = tm.getUserTimelineIdsByUid(args[1]);
      Log.logInfo(ids.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

public class GetRepostTimeline {

  public static void main(String[] args) {
    String access_token = args[0];
    String id = args[1];
    Timeline tm = new Timeline();
    tm.client.setToken(access_token);
    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 class GetFriendsTimelineIds {

  public static void main(String[] args) {
    String access_token = args[0];
    Timeline tm = new Timeline();
    tm.client.setToken(access_token);
    try {
      JSONObject status = tm.getFriendsTimelineIds();
      Log.logInfo(status.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }
View Full Code Here

public class QueryId {

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

      try {
        byte[] content = readFileImage(args[2]);
        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();
        tl.client.setToken(args[0]);// access_token
        Status status = tl.UploadStatus(s, pic);

        System.out.println("Successfully upload the status to [" + status.getText() + "].");
      } catch (Exception e1) {
        e1.printStackTrace();
      }
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.