attempt to fix invalid_grant error

This commit is contained in:
Athou
2013-04-21 10:20:30 +02:00
parent d39503f586
commit cb55865652

View File

@@ -81,6 +81,9 @@ public class GoogleImportCallbackPage extends WebPage {
tokenRequest.setGrantType("authorization_code");
try {
// potential fix for invalid_grant error, happens if local
// system time is ahead of google servers time
Thread.sleep(1000);
TokenResponse tokenResponse = tokenRequest.execute();
String accessToken = tokenResponse.getAccessToken();