Gson gson = new Gson();
java.util.List<NameValuePair> formparams = new java.util.ArrayList<NameValuePair>();
formparams.add(new BasicNameValuePair("client_id", appid));
formparams.add(new BasicNameValuePair("client_secret", appkey));
formparams.add(new BasicNameValuePair("grant_type", "password"));
formparams.add(new BasicNameValuePair("username", username));
formparams.add(new BasicNameValuePair("password", password));
org.apache.http.client.fluent.Response httpres =
Request.Post("
https://api.weibo.com/oauth2/access_token")
.bodyForm(formparams).execute();
org.apache.http.HttpResponse resp = httpres.returnResponse();
client_id=140226478
client_secret=42fcc96d3e64d9e248649369d61632a6