}
StringBuilder strb = new StringBuilder();
strb.append("message=").append(
URLEncoder.encode(msg, Constants.ENCODING));
strb.append("&access_token").append("=").append(accessGrant.getKey());
Response serviceResponse;
try {
serviceResponse = authenticationStrategy.executeFeed(
UPDATE_STATUS_URL, MethodType.POST.toString(), null, null,
strb.toString());
if (serviceResponse.getStatus() != 200) {
throw new SocialAuthException(
"Status not updated. Return Status code :"
+ serviceResponse.getStatus());
}
} catch (Exception e) {
throw new SocialAuthException(e);
}
return serviceResponse;