I am unable to get my project to read in my twitter4j.properties
file even though I have copied it to the root of the project folder in Eclipse. I have filled out the properties file according to the configuration guide like so:
oauth.consumerKey=thisismyconsumerkey
oauth.consumerSecret=thisismyconsumersecret
oath.accessToken=14778563-thisismyaccesstoken
oath.accessTokenSecret=thisismyaccesstokensecret
debug=true
http.prettyDebug=true
I am initiating a Twitter stream like so:
TwitterStream twitterStream = new TwitterStreamFactory().getInstance();
twitterStream.addListener(listener);
twitterStream.sample();
I am able to get the application to run if I manually set it using ConfigurationBuilder
, but I would like for the application to read my properties file instead. Is there something else that I have to do in order to get my project to recognize the file?
Completely overlooked my accessToken and accessTokenSecret. oath
should be oauth
. Let this be a lesson: don't code too late into the night.
For what it's worth, I put the twitter4j.properties
file in the root of my project folder and it works perfectly.