How to make a user tweet into his/her twitter account from java web application -


hello want build java web application in want user tweet on account java application.

now when considering twitter4j code shows using our own registered application on twitter dev portal. not asking clients credentials. please tell me how figure out want guidance not code.

i read many post confusing , not understanding.

i want make user tweet his/her twitter account java web application.

information gathered

http://blog.blprnt.com/blog/blprnt/quick-tutorial-twitter-processing

read tutorial

  1. import twitter4j library – dragging twitter4j-2.0.8.jar file onto sketch window. if want check, should see file in sketch folder, inside of new code directory.
  2. we’ll put guts of example setup enclosure, wrap function or build simple class around if you’d like:

    twitter mytwitter = new twitter("yourtwitterusername", "yourtwitterpassword");

but twitter 4j upgraded

twitter4j-3.0.3 

and twitter interface. do

as added juned's answer below

i have supply particular user

oauth.consumerkey=********************* oauth.consumersecret=****************************************** oauth.accesstoken=************************************************** oauth.accesstokensecret=****************************************** 

so know particular registered app twitter provides keys. want know random user keys.

i believe cannot using username , password. need generate key secret token , tokensecret. read these properties example file:

oauth.consumerkey=********************* oauth.consumersecret=****************************************** oauth.accesstoken=************************************************** oauth.accesstokensecret=****************************************** 

and using java code use these properties access user account tweeting, here sample code:

configurationbuilder cb = new configurationbuilder(); cb.setdebugenabled(true)   .setoauthconsumerkey("*********************")   .setoauthconsumersecret("******************************************")   .setoauthaccesstoken("**************************************************")   .setoauthaccesstokensecret("******************************************"); twitterfactory tf = new twitterfactory(cb.build()); twitter twitter = tf.getinstance(); 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -