public Token getRequestToken(URI callback, ReservationRequest request) { try { // This is an optional step. Without requesting this extra scope // the client will not be able to update the user's calendar. // Note that the Social.com has documented the format of this scope // as updateCalendar-x where x is a specific hour. // Social.com has also documented that a "readCalendar" scoped will be // allocated by default Map<String, String> extraParams = new HashMap<String, String>(); extraParams.put( org.apache.cxf.rs.security.oauth.utils.OAuthConstants.X_OAUTH_SCOPE, OAuthConstants.UPDATE_CALENDAR_SCOPE + request.getHour()); return OAuthClientUtils.getRequestToken(requestTokenService, consumer, callback, extraParams); } catch (OAuthServiceException ex) { return null; } }