/** {@inheritDoc} */ @Override public AccessToken getOAuthAccessToken() throws MoefouException { ensureTokenIsAvailable(); if (oauthToken instanceof AccessToken) return (AccessToken) oauthToken; oauthToken = new AccessToken(http.post(conf.getOAuthAccessTokenURL(), this)); return (AccessToken) oauthToken; }
/** {@inheritDoc} */ @Override public AccessToken getOAuthAccessToken(final String oauthVerifier) throws MoefouException { ensureTokenIsAvailable(); final String url = conf.getOAuthAccessTokenURL(); oauthToken = new AccessToken( http.post( url, new HttpParameter[] {new HttpParameter("oauth_verifier", oauthVerifier)}, this)); return (AccessToken) oauthToken; }