why doesn't the following code work?
function RefreshActs()
{
var req = opensocial.newDataRequest();
req.add(req.newFetchActivitiesRequest("VIEWER"),
"viewer_activities");
req.send(onLoadActivities);
}
function onLoadActivities(data)
{
var activities = data.get('viewer_activities').getData()
['activities'];
html = "<ul>";
activities.each(ShowActs(activity));
html += "<ul>";
document.getElementById('Activities').innerHTML = "The activities:
<br>";
document.getElementById('Activities').innerHTML += html;
}
function ShowActs(activity)
{
html+="<li>"+
activity.getField(opensocial.Activity.Field.TITLE)+"</li><br>"
}
The Firefox Firbug says that "activities" is null. why?
By the way, I use Orkut Sandbox (open social 0.7).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenSocial Application Development" 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-api?hl=en
-~----------~----~----~----~------~----~------~--~---