Upgrading Gadget Server

Hi devs,

I know this is late in the game, but I plan to move to most apps in our sandbox to our new production gadget server at 6pm PT.  I will not be moving certain apps that I know have compatibility problems with this new release.

There's a lot of new good things in our new gadget server.  Here's the changelog:

Better Performance via Batched Requests

When you create a new opensocial.DataRequest() all items are submitted to the server and the results come back in one shot.  The following code will send one request to the backend that updates some app data, loads the owner/viewer/viewer friends, and loads app data for viewer and viewer_friends.  All in one request!

  var req = opensocial.newDataRequest();
  req.add(req.newUpdatePersonAppDataRequest('VIEWER', 'gifts', json));
  req.add(req.newFetchPersonRequest('VIEWER', opts), 'viewer');
  req.add(req.newFetchPersonRequest('OWNER', opts), 'owner');
  req.add(req.newFetchPeopleRequest('VIEWER_FRIENDS', opts), 'viewerFriends');
  req.add(req.newFetchPersonAppDataRequest('VIEWER', 'gifts'), 'data');
  req.add(req.newFetchPersonAppDataRequest('VIEWER_FRIENDS', 'gifts'), 'viewerFriendData');
  req.send(onLoadFriends);

Activity Feed Fetching

You can now fetch activity feed data for any set of users.

Better Support for Application Data

You app can now get application data for whole sets of user ids.

Important!  Our old version of the datarequest API had a bug with respect to the Open Social standard.  Per that standard all data is now html escaped.  If you're using JSON or other format sensitive data you should decode your data like this:

        var json = gadgets.util.unescapeString(data[person.getId()]['gifts']);

New methods for getting User Presence and Online Status

We previously had published a way of retrieving hi5 presence and status data via custom APIs.  We've changed this so that you can get this information in any fetchPersonRequest/fetchPeopleRequest call.  The new way of retrieving this data is to pass in a valid list of PROFILE_DETAILS.  Here's a sample:

  var opts = {};

  opts[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
                     [opensocial.Person.Field.AGE,
                     opensocial.Person.Field.NAME,
                     opensocial.Person.Field.GENDER,
                     opensocial.Person.Field.PROFILE_URL,
                     opensocial.Person.Field.THUMBNAIL_URL,
                     opensocial.Person.Field.STATUS,
                     hi5.PersonField.PRESENCE
   ];

  var req = opensocial.newDataRequest();
  req.add(req.newFetchPersonRequest('VIEWER', opts), 'viewer');
  .....

In your callback you can get at this data in the following way:

  var status = viewer.getField(opensocial.Person.Field.STATUS);
  var presence = viewer.getField(hi5.PersonField.PRESENCE);


Albums Support

This current build does not support fetching albums.  We will add this feature in before monday.

Signed Requests

You can now make requests to your backend server with SIGNED requests.  Adding this to your application means that you can be assured that data has not been spoofed or tampered.  Here's a simple example of using signed requests:

              gadgets.io.makeRequest("http://www.inuus.com/os/testOauth.php", function(r) { alert(response.text);},
                 {CONTENT_TYPE: gadgets.io.ContentType.JSON, 
                  METHOD: "POST",
                  POST_DATA: "message=moooooo",
                  AUTHORIZATION: gadgets.io.AuthorizationType.SIGNED});

You can use an OAuth compatible library to verify the requests are correct.  We have one available here:

http://www.hi5networks.com/platform/browser/sampleapps/

The hi5modules.com public certificate can be downloaded here:

http://www.a.hi5modules.com/hi5modules.com.cert



1 Comment

Great update and nice to have the signed request feature !

About moving apps from sandbox to production server, how can we know that our app is moving and not have "compatibility problems with this new release." ?

Thanks for the information
Victor

Leave a comment

Recent Entries

  • hi5 Announces Support for Facebook® Compatible APIs

    New interfaces minimize integration effort for social game developers San Francisco, CA; Mar. 2, 2010 -- hi5, the largest social entertainment site focused on gaming,...

  • hi5 to Unveil New Game Developer Program at GDC

    Alex St. John, hi5's President & CTO and long-time gaming visionary, will unveil the details of hi5's new Game Developer Program at the Game Developers...

  • Changes to hi5 Profile for OpenSocial Apps

    As you have probably noticed, we are introducing an entirely redesigned user interface for hi5.com. This new release was announced for public beta on October...

  • Hi5 Platform Update - May 2009

    As you may have noticed, hi5 has undergone some changes lately.  We're refocusing on the social entertainment market.  You may have noticed the new hi5...

  • Platform News - November 2008

    We've been busy working on the hi5 platform.  Recent releases include:Flash 9/10 Compatibility -- With Adobe's recent release of Flash 10 we noticed a number...

Close