Examples of updateStatus()


Examples of twitter4j.Twitter.updateStatus()

        // Titterオブジェクトの生成
        TwitterFactory twitterFactory = new TwitterFactory(cb.build());
        Twitter twitter = twitterFactory.getInstance();

        twitter.updateStatus(msg);
    }

    /**
     * Twitter Post
     * @param userModel
View Full Code Here

Examples of twitter4j.Twitter.updateStatus()

            }
            System.out.println("Got access token.");
            System.out.println("Access token: "+ accessToken.getToken());
            System.out.println("Access token secret: "+ accessToken.getTokenSecret());

            Status status = twitter.updateStatus(args[0]);
            System.out.println("Successfully updated the status to [" + status.getText() + "].");
            System.exit(0);
        } catch (TwitterException te) {
            System.out.println("Failed to get timeline: " + te.getMessage());
            System.exit( -1);
View Full Code Here

Examples of twitter4j.Twitter.updateStatus()

            System.out.println(
                "Usage: java twitter4j.examples.Update ID Password text");
            System.exit( -1);
        }
        Twitter twitter = new Twitter(args[0], args[1]);
        Status status = twitter.updateStatus(args[2]);
        System.out.println("Successfully updated the status to [" + status.getText() + "].");
    }
}
View Full Code Here

Examples of twitter4j.Twitter.updateStatus()

  public void execute(DelegateExecution execution) throws Exception {     
    String content = (String) execution.getVariable("content");
     
    AccessToken accessToken = new AccessToken("220324559-8hWDVUXMSOaAnmtNNwBuNuhGJ6hOGwNdWHqhdOsU", "sGBZafB7saWYMwnPQGjjwU9Ggr0IJYkmPdyAFU5PI");
    Twitter twitter = new TwitterFactory().getOAuthAuthorizedInstance("HW62M0Rxtt39CbgdgP1og", "TJHNqolmPD6aHPtX8ec5Xp5zgIJcsMBTkwMpGCqdGuk", accessToken);
    twitter.updateStatus(content);
  }

}
View Full Code Here

Examples of twitter4j.Twitter.updateStatus()

   */
  private void post(String twitterUrl, String twitterUsername,
      String twitterPassword, String msg) throws Exception {
    System.out.println("Posting to Twitter: " + msg);
    Twitter twitter = new Twitter(twitterUsername, twitterPassword, twitterUrl);
    twitter.updateStatus(msg);
  }


  /**
   * create a shortened version of the given url
View Full Code Here

Examples of weibo4j.Timeline.UpdateStatus()

    String statuses = args[1];
    Weibo weibo = new Weibo();
    weibo.setToken(access_token);
    Timeline tm = new Timeline();
    try {
      Status status = tm.UpdateStatus(statuses);
      Log.logInfo(status.toString());
    } catch (WeiboException e) {
      e.printStackTrace();
    }  }
View Full Code Here

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

Examples of weibo4j.Weibo.updateStatus()

    }
       
        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

Examples of weibo4j.Weibo.updateStatus()

       
        // 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

Examples of weibo4j.Weibo.updateStatus()

    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
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.