views:

65

answers:

2

Hi there, I'm making a Twitter client in Java, and I've came to a problem I don't know how to solve it.

How the hell I store open auth for twitter? I mean it doesn't make very sense for a person to allow an application every time he wants to use the client. I've been look at the Twitter documentation, but I must say, it's really poor in terms of Java.

So do you guy have some idea to solve this?

Thanks in advance!

+2  A: 

After your application successfully authenticates to Twitter, you will receive two strings: OAuthToken and OAuthTokenSecret. You store these tokens in a cookie, a user settings file, or wherever makes sense for your application.

Then, whenever you are making a call to the Twitter API, you retrieve these strings from the cookie or the user settings file, or wherever, and include them in the API call.

Or is there something about your question that I don't understand?

DWRoelands
A: 

Yes, unless the user revokes the permission of your application.

Sheng Chien