You are right, I am not getting the email . But I am trying to send messages
to the owner-friends. I found a method that sends message to the
owner_friends or viewer_friends with *requestSendMessage()* .I read this
information from this link:
http://orkutdeveloper.blogspot.com/2008/05/new-users-and-new-interactions.html

But this *requestSendMessage()* method also not working for me either. Its
not sending me the messages.

Thanks
On Thu, Sep 25, 2008 at 3:45 PM, Robson Dantas <[EMAIL PROTECTED]> wrote:

>  Hi,
>
> As I said you cant get e-mail data. If you want to do that, you must do a
> form and let user fill their e-mail when installing & configuring app. Save
> that on app data and then get it back when you want.
>
> --Robson
>
> 2008/9/25 agulla <[EMAIL PROTECTED]>
>
>
>> Hi Robson,
>>
>>  Thank you very much for your email. Is there other way to send messages
>> to the owner friends. I tried to send through requestSendMessage() but its
>> not sending the message. Do you have any idea.
>>
>> Thanks in advance.
>>   On Thu, Sep 25, 2008 at 3:19 PM, Robson Dantas <[EMAIL PROTECTED]>wrote:
>>
>>>  Hi !
>>>
>>> E-mail is not available due to privacy issues. It's private.
>>>
>>>
>>> --Robson
>>>
>>>
>>>
>>> 2008/9/25 [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>>>
>>>
>>>> Hi
>>>>
>>>>  I have to send invitation to my hosting application friends from my
>>>> opensocial application. To implement this, I found that opensocial
>>>> provides a method requestSendMessage(), first thing this method was
>>>> not sending messages, I tried with my own account and it allows only
>>>> 10 invocations per day. I tried to use the
>>>> opensocial.Person.Field.EMAILS but its showing undefined as the
>>>> result. Could any one please tell me whats the wrong in my code.
>>>>
>>>> Here is my code snippet that gets the list of friends and the owners
>>>> email id(iam trying to retrieve for the moment the owners email id for
>>>> testing purposes) and I also posted the method that uses
>>>> requestSendMessage() if it allows more than 10 invocations, i will
>>>> this.
>>>>
>>>> /*Request for friends information*/
>>>> function getFriends()
>>>> {
>>>>  var params= {};
>>>>  params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
>>>> [opensocial.Person.Field.EMAILS];
>>>>
>>>>  //params[opensocial.DataRequest.DataRequestFields.ESCAPE_TYPE] =
>>>> [opensocial.EscapeType.NONE];
>>>>
>>>>  var req = opensocial.newDataRequest();
>>>>  //req.add(opensocial.Email.Field.ADDRESS,params);
>>>>
>>>>
>>>> req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER,params),
>>>> 'owner');
>>>>
>>>>
>>>> req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS),
>>>> 'ownerFriends');
>>>>  req.send(onLoadFriendsData);
>>>> };
>>>> /*dataResponse Friend information that was requested*/
>>>> function onLoadFriendsData(dataResponse)
>>>> {
>>>>    var owner = dataResponse.get('owner').getData();
>>>>  // var email = owner.getField(opensocial.Person.Field.EMAILS); 1
>>>>  var email = owner.getField(opensocial.Person.Field.EMAILS)
>>>> [0].getField(opensocial.Email.Field.ADDRESS);
>>>>  alert(email);
>>>>  var html = 'List of your Friends : '+ ' <a
>>>> href=javascript:CloseFriendsDiv()>Close</a>';
>>>>  html += '<br><ul>';
>>>>  var ownerFriends = dataResponse.get('ownerFriends').getData();
>>>>  ownerFriends.each(function(person) {
>>>>   html += '<li>' + person.getDisplayName() + '</li>';
>>>>  });
>>>>  html += '</ul>';
>>>>  document.getElementById('friendsList').style.display = '';
>>>>  document.getElementById('friendsList').innerHTML = html;
>>>> };
>>>> function sendEmail()
>>>> {
>>>>  var params = [];
>>>>
>>>>  var subject = "";
>>>>  var tbSubjectCtrl = document.getElementById('tbSubject');
>>>>  if(tbSubjectCtrl != null)
>>>>  {
>>>>    subject = tbSubjectCtrl.value;
>>>>  }
>>>>  params[opensocial.Message.Field.TITLE]= subject;
>>>>
>>>>  var body="";
>>>>  var tbMessageCtrl = document.getElementById('tbMessage');
>>>>  if(tbMessageCtrl != null)
>>>>  {
>>>>    body = tbMessageCtrl.value;
>>>>  }
>>>>  var message = opensocial.newMessage(body, params);
>>>>
>>>>  var recipient = opensocial.DataRequest.PersonId.OWNER;
>>>>  alert(recipient + ' ' + message);
>>>>  opensocial.requestSendMessage(recipient, message);
>>>> };
>>>>
>>>> Any Ideas would be appreciated!
>>>> >>>>
>>>>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to