Jump to content



Photo

How to use the Twitter API

java twitter api

  • Please log in to reply
2 replies to this topic

#1 thatguyandrew1992

thatguyandrew1992

    Neowinian Senior

  • Tech Issues Solved: 4
  • Joined: 22-January 09

Posted 21 July 2012 - 01:31

I am new Java programmer and I want to learn how to use an API and I want to start with Twitter.
How do I use the api to send credentials in Java? I've never used the HTTP GET so I'm having trouble on learning that. I'm also trying to learn about tokens.
How do I use the api to grab the followers in Java for example?

It seems I need to use HTTPConnection but the tutorials online aren't really helping me. I just really need some help with this. Maybe examples with good comments and explanations?

Any tips for working with APIs in general?

Thanks Neowin!


#2 Max Norris

Max Norris

    Neowinian Senior

  • Tech Issues Solved: 22
  • Joined: 20-February 11
  • OS: Windows 2012R2, 7, BSD Unix
  • Phone: HTC One (Work) Lumia 1020 (Home)

Posted 21 July 2012 - 02:07

If you want to save yourself some frustration, you could try using one of the various third party libraries that are available that make it significantly easier to work with. Twitter4j is a good one to start with for Java, well documented, has a bunch of examples and is pretty easy to figure out. Wraps up pretty much everything, OAuth, streaming, the works.

http://twitter4j.org/en/index.html

#3 OP thatguyandrew1992

thatguyandrew1992

    Neowinian Senior

  • Tech Issues Solved: 4
  • Joined: 22-January 09

Posted 21 July 2012 - 02:24

If you want to save yourself some frustration, you could try using one of the various third party libraries that are available that make it significantly easier to work with. Twitter4j is a good one to start with for Java, well documented, has a bunch of examples and is pretty easy to figure out. Wraps up pretty much everything, OAuth, streaming, the works.

http://twitter4j.org/en/index.html


I downloaded that but was really confused. I'll find the examples to see if it helps! Thanks!