Posting tweets from a java application

前端 未结 4 800
借酒劲吻你
借酒劲吻你 2021-02-10 07:19

I want to auto tweet from a java application. What is the simplest way to do it? Can i avoid using libraries like Twitter4j etc.,

I need an implementation for a simple a

4条回答
  •  难免孤独
    2021-02-10 08:04

    I want to auto tweet from a java application.

    I hope you are not spamming.. :D

    Try this one: http://code.google.com/p/java-twitter/

    You can wrap the example code into:

    public void tweet(String username, String password, String message){
    
    Api api = Api.builder().username(username).password(password).build();
    api.updateStatus(message).build().post();
    
    }
    

    And then call it as tweet.(username,pass,message)

    Looks simple to me.

提交回复
热议问题