I need to be able to make different Twitter
instances with same consumer key and secret but different user level access tokens.
I have already obtained the access tokens for 10 users based on consumer credentials of my app by using standard Twitter OAuth Sign In protocol. Now, I want to create a list of Twitter Instances each initialized with a separate Accesstoken
. However, I'm not able to do this.
My leading cause of confusion is, that, I don't understand how Twitter4j
instantiates Twitter instances. I don't understand the difference between TwitterFactory.getSingleton()
method and TwitterFactory().getInstance()
method.
I also don't understand if AccessTokens can work independently without supplying consumer key and secret. Or do I need to provide Consumer key and secret while using Accesstokens.
If someone can explain in detail the design for my requirement it'll be highly appreciated.