Are the consumer/access tokens and secrets protected via TwitterTemplate?

69 Views Asked by At

I am planning on a simple standalone, non-webapp Twitter demo for the purpose of getting my hands wet with spring-social; there is no frontend. For simplicity, everything will be run off method main for the demo and the consumerKey, consumerSecret, accessToken, and accessTokenSecret are all visible.

Twitter twitter = new TwitterTemplate(consumerKey, consumerSecret,
    accessToken, accessTokenSecret);

Does interacting with twitter.xxOperations() protect the underlying keys and secrets?

1

There are 1 best solutions below

0
On

I am not sure what you mean by this, but still try to give you an explanation of what I have learned so far.

Does interacting with twitter.xxOperations() protect the underlying keys and secrets?

When you use TwitterTemplate() you are allowing everyone (every User who have access to your service) to access xxxOperations(), this is Anonymous Twitter Connection.

Whereas if you use Twitter() constructor as demonstrated in this tutorial you restrict Users and force them to login to Twitter.com to access xxxOperations()provided by your service.

I just pushed my experiments with Spring-Social-Twitter in my Github repo, you might wanna checkout. Hope this helps.