Friday, May 4, 2012

[YouTube-API] Re: InvalidEntryException while connecting

Hello,

I can't recommend using the Google Data APIs client library at this
time. The YouTube Data API is still based on GData, and the
appropriate library to use (if you're going to use a client library at
all; it's not required) is the GData version:

http://code.google.com/p/gdata-java-client/

If you're writing Android code or can't use the GData library for
some other reason, then making HTTP requests yourself and asking for
JSON data back is probably the easiest approach, as JSON is easy to
parse without requiring a client library.

Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev


On May 2, 10:36 am, Андрей Кирсанов <kirsano...@list.ru> wrote:
> I successfully compiled YouTubeReadonlyClient.java from Google Data
> APIs Client Library, but I got error running it.
>
> Console is next:
>
> The server had a problem handling your request.
> com.google.gdata.util.InvalidEntryException: Invalid value for
> parameter: username
> <errors xmlns='http://schemas.google.com/g/2005'><error><domain>GData</
> domain><code>InvalidRequestUriException</code><internalReason>Invalid
> value for parameter: username</internalReason></error></errors>
>         at
> com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGData Request.java:
> 602)
>         at
> com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleG DataRequest.java:
> 564)
>         at
> com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataReques t.java:
> 560)
>         at
> com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java :
> 538)
>         at
> com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest. java:
> 536)
>         at com.google.gdata.client.Service.getFeed(Service.java:1135)
>         at com.google.gdata.client.Service.getFeed(Service.java:998)
>         at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:
> 645)
>         at com.google.gdata.client.Service.getFeed(Service.java:1017)
>         at
> sample.youtube.YouTubeReadonlyClient.printVideoFeed(YouTubeReadonlyClient.j ava:
> 545)
>         at
> sample.youtube.YouTubeReadonlyClient.printUploads(YouTubeReadonlyClient.jav a:
> 508)
>         at
> sample.youtube.YouTubeReadonlyClient.main(YouTubeReadonlyClient.java:
> 735)
>
> Why is this?

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment