On Sun, Sep 28, 2008 at 4:13 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Can I read Activities in v0.8 (like in "hi5")?
>
> I wrote this:
>
> function RefreshActs()
> {
>        var req = opensocial.newDataRequest();
>        var spec = new opensocial.IdSpec();
>        spec.setField(opensocial.IdSpec.Field.USER_ID,
> opensocial.IdSpec.PersonId.OWNER);
>        req.add(req.newFetchActivitiesRequest(spec), 'viewer_activities');
>        req.send(onLoadActivities);
> }
>
> function onLoadActivities(data)
> {
>        alert(activities==null);                 // I get "false"
>        alert(activities['activities']==null); // I get "true"
> }
>
> What is going on?
> What does "activities" really contain?

According to the docs [1] it contains a Container[2] of Activities.

HTH,
~Simon

[1] "When processed, returns a Collection<Activity>."
http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.DataRequest.newFetchActivitiesRequest
[2] 
http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.Collection

-- 
"The history of mankind for the last four centuries is rather like
that of an imprisoned sleeper, stirring clumsily and uneasily while
the prison that restrains and shelters him catches fire, not waking
but incorporating the crackling and warmth of the fire with ancient
and incongruous dreams, than like that of a man consciously awake to
danger and opportunity."  --H. P. Wells, "A Short History of the
World"

--~--~---------~--~----~------------~-------~--~----~
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