final String clientId = clientIdEngineSettingValue.getValue();
final String clientSecret = clientSecretEngineSettingValue.getValue();
final String twitterCallBackURL = urlService.buildAbsoluteUrl(requestData, urlService.buildOAuthCallBackUrl(requestData, OAuthType.TWITTER.getPropertyKey().toLowerCase()));
OAuthService service = new ServiceBuilder()
.provider(TwitterApi.class)
.apiKey(clientId)
.apiSecret(clientSecret)
.callback(twitterCallBackURL)
.build();
final String code = request.getParameter(REQUEST_PARAM_OAUTH_VERIFIER);
if(StringUtils.isNotEmpty(code)) {
Verifier verifier = new Verifier(code);
Token requestToken = (Token) request.getSession().getAttribute(TWITTER_OAUTH_REQUEST_TOKEN);
Token accessToken = service.getAccessToken(requestToken, verifier);
OAuthRequest oauthRequest = new OAuthRequest(Verb.GET, TWITTER_URL);
service.signRequest(accessToken, oauthRequest);
Response oauthResponse = oauthRequest.send();
int responseCode = oauthResponse.getCode();
String responseBody = oauthResponse.getBody();
if(responseCode == 200){