Package weibo4j

Examples of weibo4j.Comment


    } catch (InterruptedException e) {
      e.printStackTrace();
    }
        // add a comment for the status
        long sid = status.getId();
        Comment cmt = weibo.updateComment("评论1 " + new java.util.Date(),  String.valueOf(sid), null);
       
        weibo.getComments(String.valueOf(sid));
       
        weibo.updateComment("评论2 " + new java.util.Date(),  String.valueOf(sid), null);

    try {
      Thread.sleep(1000); // avoid flush server
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    Comment cmt2 = weibo.destroyComment(cmt.getId());
    System.out.println("delete " + cmt2);
    }
View Full Code Here


          Weibo weibo = getWeibo(true,args);
          Status status = weibo.updateStatus("新增微博信息");
          Thread.sleep(1000);
          String sid = status.getId()+"";
          System.out.println(sid + " : "+ status.getText()+"  "+status.getCreatedAt());
          Comment comment = weibo.updateComment("发表评论", sid, null);
          System.out.println(comment.getId() + " : " + comment.getText() + "  " + comment.getCreatedAt());
          Thread.sleep(1000);
          weibo.destroyComment(comment.getId());
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

        try {
          Weibo weibo = getWeibo(true,args);
          Status status = weibo.updateStatus("撒旦撒旦顶顶顶顶顶顶,,");
          Thread.sleep(1000);
          String sid = status.getId()+"";
          Comment comment = weibo.updateComment("踩踩踩踩踩", sid, null);
          System.out.println(comment.getId() + " : " + comment.getText() + "  " + comment.getCreatedAt());
          Thread.sleep(1000);
          comment = weibo.updateComment("踩踩踩踩踩1", sid, null);
          System.out.println(comment.getId() + " : " + comment.getText() + "  " + comment.getCreatedAt());
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

  List<Comment> newComments = sinaWeiboApi.getCommentTimeline(lastestCreateCommentMap != null ? lastestCreateCommentMap.getSinaCommentId() : null, null);

  log.info("Sina comment --> 同期化件数:" + newComments.size());

  // メッセージ単位で同期化処理を行う
  Comment comment = null;
  try {
    for (int i = newComments.size() - 1; i >= 0; i--) { // FOR-101
    comment = newComments.get(i);
    if (this.commentMapDao.getBySinaCommentId(comment.getId(), user.getId()) == null) {
      boolean result = syncSinaUserComment(user, comment, new CommentMap());
      if (result)
      count++;
    } else {
      log.info("Sina comment --> [" + comment.getId() + "] 同期化済みでスキップする。");
    }
    }
  } catch (ApiLimitedException e) {
    e.printStackTrace();
    // DO NOTHING
View Full Code Here

TOP

Related Classes of weibo4j.Comment

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.