Reputation: 650
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setDebugEnabled(true)
.setOAuthConsumerKey("*********************")
.setOAuthConsumerSecret("******************************************")
.setOAuthAccessToken("**************************************************")
.setOAuthAccessTokenSecret("******************************************");
TwitterFactory tf = new TwitterFactory(cb.build());
Twitter twitter = tf.getInstance();
What are the values in place of *?
Upvotes: 2
Views: 3321
Reputation: 2539
The Consumer Key and Consumer Secret are provided when you create your application at https://dev.twitter.com/apps. There is more information in this question. You then have to get the access token from your users.
The Twitter developer documentation has a description of the whole process, but it can be hard to know where to start. I suggest you look for guide like this one. (Understanding how OAuth works will make the whole process clearer.)
Upvotes: 2