Package weibo4j

Examples of weibo4j.Weibo.updateStatus()


            /*
       * 此处需要填写AccessToken的key和Secret,可以从OAuthUpdate的执行结果中拷贝过来
             */
            weibo.setToken("e42f35bd66fce37d7c6dfeb6110d8957", "a1943b8ea10eb708e67825d25675d246");
           
            Status status = weibo.updateStatus("你好吗?");
           
            System.out.println("Successfully updated the status to [" + status.getText() + "].");
            System.exit(0);
        } catch (WeiboException te) {
            System.out.println("Failed to get timeline: " + te.getMessage());
View Full Code Here


    }
       
        String msg = args[2] + new java.util.Date();
       
        // normal status
         Status status = weibo.updateStatus(args[2] + System.currentTimeMillis());
        // status with geocode
    try {
      status = weibo.updateStatus(msg, 40.7579, -73.985);
    } catch (JSONException e1) {
      e1.printStackTrace();
View Full Code Here

       
        // normal status
         Status status = weibo.updateStatus(args[2] + System.currentTimeMillis());
        // status with geocode
    try {
      status = weibo.updateStatus(msg, 40.7579, -73.985);
    } catch (JSONException e1) {
      e1.printStackTrace();
    }
       
        long l2 = System.currentTimeMillis();
View Full Code Here

    try {
      Weibo weibo = new Weibo();

      weibo.setToken(access.getToken(), access.getTokenSecret());

      Status status = weibo.updateStatus(content);
      System.out.println("Successfully updated the status to ["
          + status.getText() + "].");
    } catch (WeiboException e) {
      e.printStackTrace();
    }
View Full Code Here

            /*
       * 此处需要填写AccessToken的key和Secret,可以从OAuthUpdate的执行结果中拷贝过来
             */
            weibo.setToken(args[0], args[1]);
     
            Status status = weibo.updateStatus(args[2]);
            System.out.println("Successfully updated the status to [" + status.getText() + "].");
            System.exit(0);
        } catch (WeiboException te) {
            System.out.println("Failed to get timeline: " + te.getMessage());
            System.exit( -1);
View Full Code Here

  public static void main(String[] args) {
    System.setProperty("weibo4j.oauth.consumerKey", Weibo.CONSUMER_KEY);
      System.setProperty("weibo4j.oauth.consumerSecret", Weibo.CONSUMER_SECRET);
        try {
          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());
View Full Code Here

    System.setProperty("weibo4j.oauth.consumerKey", Weibo.CONSUMER_KEY);
      System.setProperty("weibo4j.oauth.consumerSecret", Weibo.CONSUMER_SECRET);
        try {
          Weibo weibo = getWeibo(true,args);
          //先发表一篇微博
          Status status = weibo.updateStatus("测试测试");
          System.out.println(status.getId() + " : "+ status.getText()+"  "+status.getCreatedAt());
          //删除刚发表的微博
          status = weibo.destroyStatus(status.getId());
          List<Status> list = weibo.getUserTimeline(args[2]);//args[2]:用户id
          for(Status st : list) {//遍历当前微博信息
View Full Code Here

  public static void main(String[] args) {
    System.setProperty("weibo4j.oauth.consumerKey", Weibo.CONSUMER_KEY);
      System.setProperty("weibo4j.oauth.consumerSecret", Weibo.CONSUMER_SECRET);
        try {
          Weibo weibo = getWeibo(true,args);
          Status status = weibo.updateStatus("............");
          System.out.println(status.getId() + " : "+ status.getText()+"  "+status.getCreatedAt());
         
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

  public static void main(String[] args) {
    System.setProperty("weibo4j.oauth.consumerKey", Weibo.CONSUMER_KEY);
      System.setProperty("weibo4j.oauth.consumerSecret", Weibo.CONSUMER_SECRET);
        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);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.