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
- import
twitter4j library
– draggingtwitter4j-2.0.8.jar
file onto sketch window. if want check, should see file in sketch folder, inside of newcode
directory. 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
Post a Comment