Package weibo4j

Examples of weibo4j.Timeline


  public static void main(String[] args) {
    String access_token = args[0];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      List<Emotion> emotions =  tm.getEmotions();
      for(Emotion e : emotions){
        Log.logInfo(e.toString());
      }
    } catch (WeiboException e) {
      e.printStackTrace();
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.getMentions();
      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 GetCommentsDaily {
  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.getCommentsDaily();
      Log.logInfo(status.toString());

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

public class GetBilateralTimeline {
  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.getBilateralTimeline();
      for(Status s : status.getStatuses()){
        Log.logInfo(s.toString());
      }
      System.out.println(status.getNextCursor());
      System.out.println(status.getPreviousCursor());
View Full Code Here

      logger.warning("Access Token is NULL");
    }

    Weibo weibo = new Weibo();
    weibo.setToken(at.getAccessToken());
    Timeline tm = new Timeline();
    try {
      StatusWapper status = tm.getHomeTimeline();
      return status.getTotalNumber();
    } catch (WeiboException e) {
      e.printStackTrace();
    }
    return 0;
View Full Code Here

      logger.warning("Access Token is NULL");
    }

    Weibo weibo = new Weibo();
    weibo.setToken(at.getAccessToken());
    Timeline tm = new Timeline();
    try {
      Paging paging = new Paging();
      if (page.getCount() >= 0) {
        paging.setCount(page.getCount());
      }
      if (page.getMaxId() >= 0) {
        paging.setMaxId(page.getMaxId());
      }
      if (page.getPage() >= 0) {
        paging.setPage(page.getPage());
      }
      if (page.getSinceId() >= 0) {
        paging.setSinceId(page.getSinceId());
      }

      logger.info("paging:" + paging);
      StatusWapper status = tm.getHomeTimeline(0,
          BlogFeature.getIntValue(feature), paging);
      if (null != status) {
        List<Blog> blogs = new ArrayList<Blog>();
        for (Status statu : status.getStatuses()) {
          Blog blog = new Blog();
View Full Code Here

public class GetPublicTimeline {

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

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

import weibo4j.model.WeiboException;

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

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

import weibo4j.model.WeiboException;

public class GetMentionsIds {
  public static void main(String[] args) {
    String access_token = args[0];
    Timeline tm = new Timeline();
    tm.client.setToken(access_token);
    try {
      JSONObject ids = tm.getFriendsTimelineIds();
      Log.logInfo(ids.toString());
    } catch (WeiboException e) {
      e.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.