Activity Stream Update

We'll have our initial Activity Stream support live in our sandbox tonight. Here's some sample code for requesting an Activity Stream entry:

// Create the activity item with a title - the title is a required field and the main text of the item
var activity = opensocial.newActivity("Something awesome just happened.");
// You can set the icon url, this field is optional
activity.setField(opensocial.Activity.Field.STREAM_FAVICON_URL, 'http://images.hi5.com/images/icons/_/update_widget.png');
// This actually creates the activity item. Currently priorities are treated the same, and all requests should be allowed
opensocial.requestCreateActivity(activity, opensocial.CreateActivityPriority['HIGH']);

Supported Fields:
  • STREAM_FAVICON_URL
  • TITLE
Partial Support
  • APP_ID - setting this does nothing, but the appId is pulled from the Hi5AuthToken
  • USER_ID - this also is pulled from the Hi5AuthToken currently, so it is always the logged in user, or viewer
  • POSTED_TIME - this is assumed to be the time the request is received

Next Steps:
  • Complete support for 0.6 fields
    • BODY - additional text
    • MEDIA_ITEMS - images
    • STREAM_SOURCE_URL, STREAM_URL, URL
  • Move on to OpenSocial 0.7
    • TITLE_ID, BODY_ID, TEMPLATE_PARAMS - support for activity stream templates

Leave a comment

Recent Entries

  • OpenSocial 0.8 Moved To Live Environment

    We have now finished the migration of the Platform in production to OpenSocial v0.8. We'd like to thank the developers who helped test 0.8 while...

  • Translation Service for OpenSocial Applications on hi5

    Reaching a Wider Audience: Community-based Translations for Applications Hi5 has a large audience in Spanish-speaking markets, Thailand, Romania, Portugal, and many other countries. How much...

  • OpenSocial 0.8 In Beta On hi5

    Following close behind the release of the OpenSocial 0.8 specification two months ago, we have been hard at work implementing it, and are happy to...

  • Statistics API Available on Sandbox

    The Statistics API that we announced two weeks ago is available on sandbox. Please use the endpoints described in the earlier post, prefixed with http://sandbox.hi5.com/rest....

  • hi5 Providing Library For Templates

    The hi5.template library is a browser side, Javascript library which enables you to fuse Javascript data and logic into your HTML. It simplifies writing...

Close