Twitter4J is updated but no library (.jar) for processing? How can I use it?

edited January 2018 in Library Questions

Hey,

I know that Twitter4J is updated into 4.0.6 or something, but it is a java file. I need to display "full text" of twitter which they just update there api a year ago. The new version of Twitter4j can do this. However, the processing library version is old. It is missing this method. I googled around and found a post talks about how to work around this here . Unfortunately, my novice skill can not just make it work.

I did download the whole folder or Twitter4J but could not figure it out how to use plain java with my code. I did try create a java file of the code from the link above, place it in the same folder of .pde, and tried to call the class-- no luck.

People said it needed only

  `twitter4j.conf.ConfigurationBuilder()
          .setOAuthConsumerKey(""))
          .setOAuthConsumerSecret("")
          .setOAuthAccessToken("")
          .setOAuthAccessTokenSecret("")
          .setTweetModeExtended(true)`  

But I do not understand java code. So I have no idea how to get into that part. Any suggestion? Thank you.

Answers

  • The link you posted is the GitHub for the project, which shows you its source code. You probably want the downloads on this page instead. Looks like that's still 4.0.5, so they haven't updated it yet.

    Or you could build the project from source code. You'd need to use Maven to build the project.

  • @KevinWorkman yeah I know. On their website is still not updated. That’s why I doownloaded the most updated one. I have looked into how to use java or make a class my self too. On Processing site, they mention Eclipse program. Is Maven different from Eclipse ? What do you mean by use? — just to complie .java to .class , or start writing everything in plain java instead ? — I have never done anything like this so I need a little guild. Thanks

  • If you don't know how to start, then honestly you might just want to wait until they update the link on their website.

    But Maven is a build tool, separate from Eclipse. (You can use Maven inside Eclipse, but you can also use Maven by itself.) The project you pointed to contains a pom.xml file, which means it's a Maven project. That means if you want to generate a .jar file from it, you have to use Maven to download dependencies and build the project.

  • edited February 2018

    Lol. ;/ Yeah I would love to wait for them but I have a feeling that it might take a year or forever. Since the library file I got at the first place is actually not from the official website anyway.

    And, just for the update of this question; I have moved into Eclipse and used the .jar file of this Twitter4j library. As expected, it works fine so I can grab full tweets to manipulate something creative. So for those who maybe looking for the same answer, the con of this is now the difficulty of exporting a project as .app. Of course, you can make .jar instead to run on a computer. The difficulty here is actually about calling file paths correctly if you make a project that calls many external sources like pictures and sounds. Because after export, your file is now .jar and not in processing .app.

    I have tried Proclipsing. It works great for prepare you the project container (.java) and file directory in finder but, no point when export. The Proclipsing dev team are not continue doing it. Therefore, there are many tasks to do after you have exported using Proclipsing just to make it run like .app

    I'm now thinking if this is worth it actually that I move into Eclipse and have the full tweets.

  • edited February 2018

    ... calling file paths correctly if you make a project that calls many external sources like pictures and sounds.

    Place them all inside subfolder "data/" and grab their paths via dataPath() or dataFile(). *-:)

Sign In or Register to comment.