URL url = new URL("http://twitter.com/statuses/update.xml");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
String cridentials =
new sun.misc.BASE64Encoder().encode((username + ":" + password).getBytes());
conn.setRequestProperty ("Authorization", "Basic " + cridentials);
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(status);
wr.flush();
wr.close();
Why is above code for updating twitter status is not working ?
I am running it on google app engine.