Hi Aaron, You need to authenticate to be able to use the API: http://code.google.com/apis/contacts/docs/1.0/developers_guide_js.html#Authenticating
Also, here is the information about retrieving a photo: http://code.google.com/apis/contacts/docs/1.0/developers_guide_protocol.html#retrieving_photo Cheers, Julian. On May 6, 7:14 am, Aaron <[email protected]> wrote: > Hi, > > Working on my first javascript/ajax project and I am stumped by the > following question and have failed to turn up anything by searching. > > The following code works as expected, it retrieves what appears to be > a link of some sort and dynamically inserts it into the desired div. > However, in Safari, I get the little missing image icon where the > image should be. (In Firefox, nothing shows up.) I tried this same > code with a link to an image known to exist, the code inserted > correctly and the image loaded into the page. So it seems that there > must be something wrong with the link or I am attempting to use the > link incorrectly. > > if (isDefined(this.entry.getContactPhotoLink())) { > code += '<img src="'+this.entry.getContactEditPhotoLink > ().getHref()+'"></img> '; > } > .... > document.getElementById(divID).innerHTML = code; > > The link returned by getContactEditPhotLink().getHref() is > "http://www.google.com/m8/feeds/photos/media/aarontkennedy%40gmail.com/193/PI..." > . If I cut and paste this link directly into the address bar, I get > the following error: Authorization required > Error 401 > > My project is a mashup of using google contacts. I am trying to print > to the screen the contact photos along with other contact > information. How do I load this image so that it works correctly? Do > I need to add it to the DOM correctly and avoid innerHTML? It seems > that it should work since the other images have loaded. > > Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
