Closed GoogleCodeExporter closed 8 years ago
Your code above is performing authentication twice.
First, you are doing ClientLogin to authorize the YouTubeService instance,
however, the rest of the code doesn't use that service or the auth token at all.
The YouTubeRequest instance will also perform ClientLogin when you try to add a
comment, so you can drop the service class entirely (assuming you are not using
it somewhere else).
Perhaps the YouTube API sees the two authentication requests coming in a short
period of time and doesn't allow them.
Remove the first authentication request and see if that helps.
If not, use a tool like Fiddler to capture one of those failed requests and
share the log with us so that we can investigate.
Original comment by ccherub...@google.com
on 13 Apr 2012 at 7:00
I seemed to have resolved the issue now, the two authentications was not the
issue as they don't happen within quick succesion and the first is used really
just to check that it is a valid log in although I have actually changed my
code now to only authenticate once. I noticed in the response string that it
was saying "posting too fast" after trying to put a second comment in, I do not
know the default time space exactly between comments but making users wait 1
minute to post another comment was to little and 2 minutes seems to work fine.
Do you know the exact timings?
Original comment by Sir.d00...@gmail.com
on 19 Apr 2012 at 8:45
Glad to hear you found the problem.
I don't know the YouTube API limits, you can try asking in the dedicated forum:
https://groups.google.com/group/youtube-api-gdata?pli=1
Original comment by ccherub...@google.com
on 19 Apr 2012 at 4:22
Original issue reported on code.google.com by
Sir.d00...@gmail.com
on 13 Apr 2012 at 10:10