* @return OAuthService instance.
*/
public static OAuthService newInstance(String userRecordKey, String consumerKey,
String consumerSecret, String requestTokenUrl, String authorizeUrl, String callbackUrl,
String accessTokenUrl) {
OAuthServiceProvider provider =
new OAuthServiceProvider(requestTokenUrl, authorizeUrl, accessTokenUrl);
OAuthConsumer consumer = new OAuthConsumer(callbackUrl, consumerKey, consumerSecret, provider);
OAuthAccessor accessor = new OAuthAccessor(consumer);
OAuthClient client = new OAuthClient(new OpenSocialHttpClient());
PersistenceManagerFactory pmf = SingletonPersistenceManagerFactory.get();
return new OAuthServiceImpl(accessor, client, pmf, userRecordKey);