Posting tweets from a java application

前端 未结 4 797
借酒劲吻你
借酒劲吻你 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:00

    Twitter has a REST web API, and a lot of documentation. For reference:

    http://dev.twitter.com/doc

    While you don't necessarily need Twitter4J, it does make it easier. Otherwise you would need to assemble your own URL requests and take care of authentication. They offer more than one style:

    http://dev.twitter.com/pages/auth_overview

    Traditionally, OAuth is the preferred style for desktop application to web server integration--but that protocol is a bit complicated.

    There's nothing that says you can't create your Tweet() method to hide away the details of using Tweet4J or hand-rolling the request yourself.

提交回复
热议问题