Dear all.. I'm trying to get my hands on the contacts api. what i'm trying to basically do is : fetch basic information of the user along with absolute path to the contact image.
Now using this : String username = [email protected] URL feedUrl = new URL("http://www.google.com/m8/feeds/contacts/"+ username +"/full"); ContactFeed resultFeed = myService.getFeed(feedUrl, ContactFeed.class); System.out.println(resultFeed.getTitle().getPlainText()); for (int i = 0; i < resultFeed.getEntries().size(); i++) { .... & so on iterate over to retrieve basic info. My other task is to retrieve image hyperlink. using method: String photoLink = entry.getContactPhotoLink().getHref(); System.out.println("Photo Link: " + photoLink); I get something like " http://www.google.com/m8/feeds/photos/media/foobar%40gmail.com/0 " as output. Indeed i need something like a image (jpeg/gif/png) as output like the one described in downloadphoto in developer's guide. for that ContactFeed resultFeed = myService. getFeed(new URL (entry.getContactPhotoLink().getHref()), ContactFeed.class); // Print the results System.out.println(resultFeed.toString()); But I still fail to retireve image as what I get is this: com.google.gdata.util.ParseException: Unrecognized content type:image/ png at com.google.gdata.client.Service.parseResponseData(Service.java: 1844) at com.google.gdata.client.Service.getFeed(Service.java:1035) at com.google.gdata.client.Service.getFeed(Service.java:897) at com.google.gdata.client.GoogleService.getFeed(GoogleService.java: 631) at com.google.gdata.client.Service.getFeed(Service.java:916) at com.equals.processors.tests.TestGoogle.downloadPhoto (GoogleTest.java:178) at com.equals.processors.tests.TestGoogle.printAllContacts (GoogleTest.java:163) at com.equals.processors.tests.TestGoogle.main(GoogleTest.java:34) Can someone help me on this that how do I either get picture downloaded or print absolute link to the picture. Any sort of help will be appreciable. Thanks in advance Ati --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Contacts API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-contacts-api?hl=en -~----------~----~----~----~------~----~------~--~---
