Tag Archives: timeline

Basic Twitter functionality

14 May

Today I finally made Twitthere useful. I added a JTextArea and posting capabilities, so now you can even post a tweet from Twitthere. Funny part is it also shows on Twitter.com that your tweet was posted through Twitthere. Furthermore it is now possible to reply on a tweet from your Home timeline (I’ve programmed it in such a way that the panel can show other timelines too, but for now it just shows the Home timeline), mention a user from your Home timeline or retweet a tweet in your Home timeline. All changes you make in Twitthere will be reflected upon Twitter.com, so it all actually works. 

The new Twitthere client, including replies / mentions & retweets

 

The only problem I’m having is checking whether you or someone else have retweeted a tweet (so it shows ‘retweeted by you’ and hides the retweet button on startup). If you retweet a tweet in Twitthere itself it updates the labels and buttons cleanly. I posted a screenshot again to give you an idea of how Twitthere evolved during the evening.  

I hope you enjoy reading my blog, checking out the new release and trying to understand the javadoc 😉 

— Léon

Proof of concept

11 May

Finally! Tonight I had some time left before I went to bed to work on Twitthere. My hands were itching with excitement because the fun part now starts. The whole OAuth cycle is just to support the main application, and that is of course a Twitter application. So, the first things I worked on today was to make sure all tweets and timelines were correctly imported from the API, copying them to a local ArrayList to save on API calls, which are rate limited. I created a wrapper class around the Status class provided by Twitter4j to make my own customizations in the future. So, now the Tweet class exists and every tweet on Twitter is an instance of Tweet in Twitthere.

Twitthere showing my Home timeline

The second thing I wanted to work on was the main window. Because I read an interesting article on advanced GUI creation in Swing, I was sort of experimenting with several JPanels when I actually found something that looked okay. So I implemented all the new methods I created in Tweet and TwitterUser to generate the Home timeline of a user. Although I’m not impressed by the design (far from it) or the way of presenting the tweets, it is a proof of concept which shows that there is light at the end of the tunnel 😉

If you are interested in my small creation, have a look at the screenshot below or download a copy from SourceForge.net: https://sourceforge.net/projects/twitthere/files/ . Of course you can also download the updated javadoc there.

Please feel free to leave any comments, let me know if it works and especially let me know when it doesn’t.

— Léon