My app working in sandbox but not working in orkut.com ???

0 views
Skip to first unread message

edo

unread,
Oct 23, 2008, 11:56:37 AM10/23/08
to Orkut Developer Forum
my app working in sandbox.orkut.com but in orkut.com not working, the
data of "viewer" and "owner" is undefined

appId=694143418089

scrapur

unread,
Oct 24, 2008, 10:53:44 AM10/24/08
to Orkut Developer Forum
Yrs apps is not approed via orkut team that's why it is not working

edo

unread,
Oct 27, 2008, 11:58:20 AM10/27/08
to Orkut Developer Forum

apps was approed and was working on orkut.com

Now, stopped working on orkut.com. Not pulls user information.

Jason

unread,
Oct 29, 2008, 4:09:47 PM10/29/08
to Orkut Developer Forum
Are you still seeing this problem? It seems to be working for me. If
so, can you link me to your profile with the application installed?

Keep in mind that VIEWER information will always be null if the
current user doesn't have the app installed -- this is normal. OWNER
information should always be available, however, so please let me know
if this is still an issue by linking to your profile.

After peeking through your code, my only observation is that you can
shorten your initial data request slightly. Your current
implementation shouldn't be causing any errors, but for future
reference, you can shorten your request to the following:

function getData() {
var req = opensocial.newDataRequest();

var opt_params = {};

opt_params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS]
= [opensocial.Person.Field.PROFILE_URL];

req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER,
opt_params), "viewer");

req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER,
opt_params), "owner");

req.send(onLoadFriends);
};


function onLoadFriends(dataResponse) {
var viewer = dataResponse.get("viewer").getData();
var owner = dataResponse.get("owner").getData();

if (viewer != null) {
idviewer = viewer.getId();
}

idowner = owner.getId();

var profile_url =
owner.getField(opensocial.Person.Field.PROFILE_URL);
...
};

Notice that I only request the OWNER once in the getData() function,
not twice. I don't have to explicitly ask for the ID since it's
returned by default for users with the app installed -- just call the
getId method of the returned opensocial.Person objects.

- Jason

edo

unread,
Oct 30, 2008, 7:35:49 AM10/30/08
to Orkut Developer Forum
thanks, now is working
Reply all
Reply to author
Forward
0 new messages