Tag Archives: class

New logic

2 May

After giving the current (infra)structure some thought, I came to the conclusion that it didn’t suit my needs. The TwitterUser class was too complex and the OAuth authorization cycle should actually be a class by itself, so I extracted all OAuth functionality from the TwitterUser class to the newly created OAuth class. The TwitterUser class is still present, because we need it later on to make some custom methods (like asynchronous API calls) and it also stores its own access token and access token secret. Furthermore I added a constructor which makes it possible to create a TwitterUser with a token ID and token secret specified (received from the file by FileIO). The instance then automatically assigns an access token to itself using the OAuth class and the two parameters.

The basics for user authorization and registration are now complete. Twitthere can now authorize Twitter users by using OAuth and can serialize the token the users receive from the authorization cycle to a file. I hope that maybe today or else tomorrow I can start on creating the first JFrame containing the login screen.

Of course I’ll keep you posted, and check out the project summary at http://sourceforge.net/projects/twitthere if you are interested in the project!

— Léon