*/
public Result<PicUploadResult> uploadPic(String oAuthConsumerKey, String accessToken,
String openid, String title, byte[] picture, String photoDesc, String albumId,
Boolean mobile, Double lon, Double lat, Boolean needFeed, Integer successNum, Integer picNum) {
HttpPost request = new HttpPost("https://graph.qq.com/photo/upload_pic");
MultipartEntityBuilder builder =
MultipartEntityBuilder.create().addBinaryBody("picture", picture,
ContentType.create("image/" + title.substring(title.lastIndexOf(".") + 1)), title);
builder.addTextBody("oauth_consumer_key", oAuthConsumerKey);
builder.addTextBody("access_token", accessToken);
builder.addTextBody("openid", openid);
builder.addTextBody("format", "json");
builder.addTextBody("title", title);
if (photoDesc != null) {
builder.addTextBody("photodesc", photoDesc);
}
if (albumId != null) {
builder.addTextBody("albumid", albumId);
}
if (Boolean.TRUE.equals(mobile)) {
builder.addTextBody("mobile", "1");
}
if (lon != null) {
builder.addTextBody("x", lon.toString());
}
if (lat != null) {
builder.addTextBody("y", lat.toString());
}
if (Boolean.FALSE.equals(needFeed)) {
builder.addTextBody("needfeed", "0");
}
if (successNum != null) {
builder.addTextBody("successnum", successNum.toString());
}
if (picNum != null) {
builder.addTextBody("picnum", picNum.toString());
}
request.setEntity(builder.build());
try {
HttpResponse response = Http.CLIENT.execute(request);
String json = IOUtils.toString(response.getEntity().getContent());
return Result.parse(json, PicUploadResult.class);
} catch (ClientProtocolException e) {