The opensocial.DataRequest.Group constants were removed from OpenSocial 0.8. Try using string literals instead:
opensocial.requestSendMessage('VIEWER_FRIENDS', message, notification); - Jason On Oct 3, 1:13 am, hem <[EMAIL PROTECTED]> wrote: > Dear Friends, > I have small problem regarding the sending message in version 0.8, > when I used version 0.7 and write the following code... then it work > fine, > > var selectedReceiverName = new Array(); > > var params = []; > thumb = viewer.getField(opensocial.Person.Field.THUMBNAIL_URL); > var titleName = "<b>"+viewer.getDisplayName()+" Send Message to you > our Application ..!</b><br>"; > params[opensocial.Message.Field.TITLE] = titleName; > //params[opensocial.Message.Field.TYPE] = > opensocial.Message.Type.NOTIFICATION; > > var body=" Dear Friend, "; > body += "<br>"+ "<img src='" + thumb + "'/>" + " has sent <img src='" > + giftImageUrl + "'/>" +" Image to you for just a Fun....."; > > var message = opensocial.newMessage(body, params); > var recipient = opensocial.DataRequest.Group.VIEWER_FRIENDS; > opensocial.requestSendMessage(recipient, message, notification); > > But when i used same code in version0.8 then it gave me error > "opensocial.DataRequest.Group is undefined" on this line... > > var recipient = opensocial.DataRequest.Group.VIEWER_FRIENDS; > > even i have changed the request code in version 0.8 and that code is > as follows:- > > var req = opensocial.newDataRequest(); > req.add(req.newFetchPersonRequest("VIEWER"), 'viewer'); > var viewerFriends = opensocial.newIdSpec({ "userId" : "VIEWER", > "groupId" : "FRIENDS" }); > var opt_params = {}; > opt_params[opensocial.DataRequest.PeopleRequestFields.MAX] = 100; > opt_params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] > = [opensocial.Person.Field.PROFILE_URL]; > req.add(req.newFetchPeopleRequest(viewerFriends, opt_params), > 'viewerFriends'); > > var viewer = opensocial.newIdSpec({"userId" : "VIEWER" }); > req.send(response); > > I am highly appreciate for your help in this problem. > Thanks in advance... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Orkut Developer Forum" group. To post to this group, send email to opensocial-orkut@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-orkut?hl=en -~----------~----~----~----~------~----~------~--~---