HttpResponse response = null;
try {
MultipartEntity mpEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
mpEntity.addPart("media[data]",
new FileBody(imageFile, "image/jpeg"));
mpEntity.addPart("media[type]", new StringBody("image"));
mpEntity.addPart("message", new StringBody(note));
mpEntity.addPart("[share_on_services][facebook]", new StringBody("false"));
mpEntity.addPart("[share_on_services][twitter]", new StringBody("false"));
mpEntity.addPart("oauth_token", new StringBody(oauthToken));
request.setEntity(mpEntity);
// send the request
response = httpClient.execute(request);
int statusCode = response.getStatusLine().getStatusCode();