Obvious bug to check if you have brains. Cheers,
Cherian On 11/6/07, mbchandar <[EMAIL PROTECTED]> wrote: > > > Article: How To Build Your First Social Gadget > Article URL : > http://code.google.com/apis/opensocial/articles/firstgadget.html > > under Heading "Displaying information about your friends" > > In the second Code Block, it shows > > var thumb = viewer.getField(opensocial.Person.Field.THUMBNAIL_URL); > var profile = viewer.getField(opensocial.Person.Field.PROFILE_URL); > > which is wrong and doesn't work. the data should be fetched from > person object instead of viewer object. viewer object just fetches the > same image and does not show the viewer friends images. below is the > code fix. i.e. just replace viewer with person because viewer_frirends > when iterated, each friends information is stored in person object. > > var thumb = person.getField(opensocial.Person.Field.THUMBNAIL_URL); > var profile = person.getField(opensocial.Person.Field.PROFILE_URL); > > example function : i have used which is the fix > viewer_friends.each(function(person) { > var thumb = person.getField(opensocial.Person.Field.THUMBNAIL_URL); > var profile = person.getField(opensocial.Person.Field.PROFILE_URL); > profile = 'http://sandbox.orkut.com' + profile; > html += '<a href="' + profile + '" target="_top" style="float:left">'; > html += '<img src="' + thumb + '"/>'; > html += '</a>'; > }); > > Dear Google, please correct it. > > thanks > -bala > http://beyondwork.wordpress.com > > > > > -- With regards Cherian Thomas, Mobile: +919886782481 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "OpenSocial Developers" group. To post to this group, send email to opensocial-api@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/opensocial-api?hl=en -~----------~----~----~----~------~----~------~--~---