try {
// if no activity stream json is fetched, the json string is "{}"
if (activityStreamJSON != null && activityStreamJSON.length() > 2) {
restActivityStream = SocialJSONDecodingSupport.parser(RestActivityStream.class, activityStreamJSON);
} else {
final QueryParams queryParamBuilder = new QueryParamsImpl().append(QueryParams.ACTIVITY_STREAM_PARAM.setValue("t"));
final String GET_ACTIVITY_REQUEST_URL = SocialHttpClientSupport.buildCommonRestPathFromContext(true)
+ "activity/" + this.getId() + ".json?" + queryParamBuilder.buildQuery();
HttpResponse response = SocialHttpClientSupport.executeGet(GET_ACTIVITY_REQUEST_URL, POLICY.BASIC_AUTH);
handleError(response);
RestActivity activity = SocialJSONDecodingSupport.parser(RestActivity.class, response);