SilverHoodCorp / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
Apache License 2.0
0 stars 0 forks source link

Unable to get photo of a single contact #139

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi everybody,

i am tring to get photo of a single contact using this gdata client api.

i am getting this error while request the entry of this URL below.i am
mentioning xxx at personal info.

URL : http://www.google.com/m8/feeds/photos/media/XXX%40gmail.com/5 

ERROR: 
com.google.gdata.util.ParseException: Unrecognized content type:image/jpeg
    at com.google.gdata.client.Service.parseResponseData(Service.java:1770)
    at com.google.gdata.client.Service.getEntry(Service.java:1234)
    at com.google.gdata.client.GoogleService.getEntry(GoogleService.java:567)
    at com.google.gdata.client.Service.getEntry(Service.java:1159)

Original issue reported on code.google.com by raghukeran@gmail.com on 19 May 2009 at 10:37

GoogleCodeExporter commented 9 years ago
which version of java client lib are you using?

please provide a code snippet to reproduce this issue.

Original comment by vbarat...@gmail.com on 20 May 2009 at 8:29

GoogleCodeExporter commented 9 years ago
Please check if you can reproduce the issue in latest lib (1.31.1).  The 
contacts
sample shipped with the package (java/sample/contacts/ContactsExample) has 
snippet of
code that retrieves a photo link and saves it to local disk.  I just check it, 
it
seem to work fine.

Original comment by vbarat...@gmail.com on 20 May 2009 at 9:22

GoogleCodeExporter commented 9 years ago
Hi,
I used 1.31.1 version jar.
I used this code to get the photo bytes from an url. 

code:
URL entryUrl = new 
URL("http://www.google.com/m8/feeds/photos/media/XXX@gmail.com/5 ");

EventEntry retrievedEntry = myService.getEntry(entryUrl, EventEntry.class);

Original comment by raghukeran@gmail.com on 21 May 2009 at 6:45

GoogleCodeExporter commented 9 years ago
Even I want to do the same & have been using the same code but get the same 
error.
Also I have tried using downloadphoto() code given in developers guide, but 
have not
been successful so far.

I need help on this too.
Thanks

Original comment by ati....@gmail.com on 10 Jun 2009 at 6:16