oauth_timestamp


#1

How to get
oauth_token
oauth_signature
oauth_timestamp dynamically in program.

I tryed this program but every time changed the above 3 parameters then only occur the solution.

HttpClient client = new DefaultHttpClient();
//long time = System.currentTimeMillis()/1000;
HttpGet httpget = new HttpGet(“https://api.twitter.com/1.1/statuses/home_timeline.json”);//HttpGet httpget = new HttpGet(“https://api.twitter.com/1/statuses/home_timeline.json&oauth_timestamp=”+ time)
httpget.setHeader(“User-Agent”, “OAuth gem v0.4.4”);
httpget.setHeader(“Host”, “api.twitter.com”);
httpget.setHeader(“Content-Type”,
“application/x-www-form-urlencoded”);
httpget.setHeader(
“Authorization”,
“OAuth oauth_consumer_key=”+“DC0sePOBbQ8bYdC8r4Smg”+","+“oauth_signature_method=”+“HMAC-SHA1”+","+“oauth_timestamp=”+“time “+”,”+“oauth_nonce=”+“1903072865”+","+“oauth_version=”+“1.0”+","+“oauth_token=”+“1307476441-YSj0AztI9hOi04FUzpyTPgDVRMMWqMGiqL1ynGn”+","+“oauth_signature=”+“e5RPBfckm57BzQeI%2FWDWdNOuoiY%3D”);

I am trying getting tweets on homeline.
but every time i changed oauth_token,oauth_signature,oauth_timestamp these three parameters.
Please tell me how to i solve this problem.
Thanks in advance.