2
votes

I'm new using the library twitter4j and I've some doubts about it. First of all I have some doubts importing the jar from twitter4j, I've reading many websites and I think that in order to make a java application that just shows the timeline of an user on twitter, I just need to import to netbeans the jar twitter4j-core-4.0.3.jar or do I need the other lib's? If that was the case is there any way to import the full .zip that I downlaoded from twitter4j just to use all the libraries?

Secondly I've trying to configure appropriately the file twitter4j.properties with oAuth identification as I says here http://twitter4j.org/en/configuration.html but I don't understand where I should place the file that I've created (using a .txt and renaming it as twitter4j.properties, where does means root of the classpath directory? I mean in the case of netbeans would it be name project >source packeges > application > twitter4j.properties ? . Moreover will these information will be available to read for other users?

Excuse me for my ignorance, but I'm really noob building app's.

Thank you in advance.

1

1 Answers

1
votes

The twitter4j-core jar should be all you need for retrieving a timeline and interacting with most of the API.

I am not familiar with Netbeans but if you can place twitter4j.properties under the 'default package' then that may work. Twitter4j is using getResouceAsStream to load the file:

Configuration.class.getResourceAsStream("/" + "twitter4j.properties")

(See here for the full source).

Finally, if you haven't already seen them, take a look at the timeline examples provided by Twitter4J. (All the examples are executable, check out the bin directory.)

I hope that helps.