Prashant,

Thanks for your response. I have double checked my javascripts and
laoded them again, but still getting the same error .

Funnything is the same code (see below) works if I try as a new app,
but doesn't want to work in the existing app. Really appreciate any
help.

When I use this code in my existing app I get the "app_id" is null or
not an object. I think this error is thrown by common.js from orkut
side.

Code I have tried:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<script type="text/javascript">

var opensocial_uids=new Array();
var opensocial_names=new Array();
var opensocial_thumbs=new Array();
init();
function init()
{
        alert("init new fun");
                        var idspec = opensocial.newIdSpec({ "userId" : "OWNER", 
"groupId" :
"FRIENDS" });
                        var a = opensocial.newDataRequest();

                        var opt_params = { };
                        
opt_params[opensocial.DataRequest.DataRequestFields.ESCAPE_TYPE] =
opensocial.EscapeType.HTML_ESCAPE;
                        
opt_params[opensocial.DataRequest.PeopleRequestFields.MAX] = 1000;
                        
opt_params[opensocial.DataRequest.PeopleRequestFields.SORT_ORDER]=
opensocial.DataRequest.SortOrder.NAME;
                        opt_params
[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
        
[opensocial.Person.Field.PROFILE_URL,opensocial.Person.Field.GENDER,opensocial.Person.Field.ADDRESSES,opensocial.Person.Field.DATE_OF_BIRTH];
                        a.add(a.newFetchPeopleRequest(idspec,opt_params), 
"get_friends");

                        a.send(initresponse);
}

function initresponse(dataResponse)
{

                var viewer_friends_appData = 
dataResponse.get('get_friends').getData
();
                if(viewer_friends_appData!=null)
                {
                        viewer_friends_appData.each(
                        function(person)
                        {
                                opensocial_uids.push(person.getId());
                                opensocial_names.push(person.getDisplayName());
                                opensocial_thumbs.push(person.getField
(opensocial.Person.Field.THUMBNAIL_URL));
                        });
                }
                var count=0;
                var frds_data="<table cellpadding='0' cellspacing='0' >";
                for(var i=0;i<opensocial_names.length;i++)
                                        {
                                                if(count%5==0)
                        {
                                                        frds_data+="<tr>";
                                                        frds_data+="<td 
align='center'><a href='javascript:void(0);'
onclick=\"requestSendMessage('"+opensocial_uids[i]+"')\"
style='cursor:pointer' ><table cellpadding='0' cellspacing='0'
class='friendtable'><tr><td valign='top' class='friendpic'><div
id='i"+opensocial_uids[i]+"'  style='width:66px; height:64px'><img
src='"+opensocial_thumbs[i]+"' class='friendpic' /></div></td><td
class='friendtext'>"+opensocial_names[i].toLowerCase().substring
(0,7)+"</td></tr></table></td></a>";
                                                }
                                                else
                        {

                           frds_data+="<td align='center'><a
href='javascript:void(0);' onclick=\"requestSendMessage
('"+opensocial_uids[i]+"')\" style='cursor:pointer' ><table
cellpadding='0' cellspacing='0' class='friendtable'><tr><td
valign='top' class='friendpic'><div id='i"+opensocial_uids[i]+"'
style='width:66px; height:64px'><img src='"+opensocial_thumbs[i]+"'
class='friendpic' /></div></td><td
class='friendtext'>"+opensocial_names[i].toLowerCase().substring
(0,7)+"</td></tr></table></td></a>";

                        }
                                                count++;
                                                if(count%5==0)
                         {
                             frds_data+="</tr>";

                                                 }
                                        }

                frds_data+="<table>";
                document.getElementById('message').innerHTML=frds_data;

        gadgets.window.adjustHeight();
}


function requestSendMessage(id)
{

        var params = {};
        params[opensocial.Message.Field.TITLE]="Orkut Invitation";
        params[opensocial.Message.Field.TYPE] =opensocial.Message.Type.EMAIL;
        var body=' invited you to add this application on Orkut. Click on the
following link to get started.';
        var message = opensocial.newMessage(body, params);
        var recipient =id;
        opensocial.requestSendMessage(recipient, message,
        function(response)
        {

        }
        );
}

</script>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Regards,
Revathi

On Mar 30, 6:42 pm, Prashant Patil <[email protected]>
wrote:
> Hi if its giving you 404 error after some time in IE then try to load
> all your Javascripts one by one or check forundefinedfunctions call!
>
> On Mon, Mar 30, 2009 at 12:36 PM, revathi <[email protected]> wrote:
>
> > Hi ,
>
> >  This is Revathi.. I have done invite friends feature for my
> > application using requestSendMessage.When i click on the image or name
> > of a friend i am getting a Runtime error in IE 7   “app_id as null or
> > not an object”  in Invite Friends functionality.This functionality
> > working fine in Fire fox.i am giving the application link below..
>
> >http://prod.sandbox.orkut.com/Main#Application.aspx?appId=970853501994
>
> > Please give me the solution..as soon as possible.
>
> --
> With best Regards.
> Prashant aka 
> Orkuteerhttp://en.blog.orkut.com/2007/11/thanks-from-orkuteer.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" 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/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to