Reputation: 527
I have downloaded the Google plus java starter project from here I set up maven, created my client_id and client_secret and my api_key and put these keys into the config.properties.
Now i started to run the project. the
setupTransport()
Method seems to work.
But if the
getProfile()
Method is called an Exception is thrown.
This is the output:
Attempting to open a web browser to start the OAuth2 flow
Once you authorize please enter the code here: [entered my Code here]
============== Get my Google+ profile ==============
Okt 16, 2012 1:25:10 PM Sample getProfile
Schwerwiegend: {
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"extendedHelp": "https://code.google.com/apis/console"
}
],
"code": 403,
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
}
}
Exception in thread "main" java.io.IOException: Stream closed
at java.util.zip.GZIPInputStream.ensureOpen(Unknown Source)
at java.util.zip.GZIPInputStream.read(Unknown Source)
at java.io.FilterInputStream.read(Unknown Source)
at com.google.api.client.http.HttpResponse.parseAsString(HttpResponse.java:464)
at Sample.main(Sample.java:45)
EDIT:
i dont know what happened, but now it works. I only copy pasted the IDs again, refreshed my project and let eclipse build it again...
Upvotes: 0
Views: 402
Reputation: 1005
Are you using the v5 .zip package from the downloads page? If so, could you try to checkout the code for the latest version and use that instead?
Upvotes: 3