You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Suresh Reddy <su...@gmail.com> on 2008/06/05 13:41:48 UTC

Hi5 application on Shindig

I'm trying to integrate one of hi5 applications with Shindig container...
I'm facing some issue while trying to load this application on Shindig.
 when I try to read the owner details... the details are served from the
local container database rather reading from hi5 account (provided in
<ModulePrefs> details...

My code looks like..

----------------------
<ModulePrefs title="My Journal" description="Display the Owner's hi5
Journal" title_url="http://suresh.hi5.com" author="Suresh" author_email="
sureshrk19@gmail.com" author_affiliation="hi5" author_location="India">
...
var p = opensocial.getEnvironment().getParams();
          Hi5AuthToken = p['Hi5AuthToken'];
          loadUsers();
        }


gadgets.util.registerOnLoadHandler(init);


        function loadUsers() {
          var req = opensocial.newDataRequest();
          req.add(req.newFetchPersonRequest('OWNER'), 'owner');
          req.add(req.newFetchPersonRequest('VIEWER'), 'viewer');
          req.send(onLoadUsers);
        }

 function onLoadUsers(dataResponse) {
          var owner = dataResponse.get('owner').getData();
          var viewer = dataResponse.get('viewer').getData();
         var ownerId = owner.getDisplayName();

-----------------------------------

When I print 'ownerId' the value not same as my hi5 userid.

Any pointers would be highly appreciated.

--Suresh

Re: Hi5 application on Shindig

Posted by Chris Chabot <ch...@xs4all.nl>.
Hey Suresh,

Could you give me a bit more detail about what your trying to  
accomplish, and what results you expected?

 From reading your email, i think you have the module author and owner  
confused?

The author is the person who wrote the gadget, and in most cases this  
is only displayed in the application gallery and/or preview mode of  
the gadget.. and not the 'owner'

The owner is the persons profile page your on ... for instance on http://chabotc.hi5.com 
  the 'owner' would be 'chris chabot', and the viewer would be 'Suresh  
Reddy' (if you are logged into hi5).. this has nothing to do with the  
metadata in the gadget..

Maybe that answers your question, or i completely miss-understood it  
which is entirely possible, if so please let me know :)

ps if you just meant that your user id is different on different  
containers ... that's supposed to work that way, a user id is a  
container specific ID and can have any format really depending on the  
site your on, it could be 'chris.chabot', or 'orkut:{134544356345634}'  
or '1' or ... well anything really :) It's just a unique identifier  
that identifies you on that one site ... and only on that site.

	-- Chris

On Jun 5, 2008, at 1:41 PM, Suresh Reddy wrote:

> I'm trying to integrate one of hi5 applications with Shindig  
> container...
> I'm facing some issue while trying to load this application on  
> Shindig.
> when I try to read the owner details... the details are served from  
> the
> local container database rather reading from hi5 account (provided in
> <ModulePrefs> details...
>
> My code looks like..
>
> ----------------------
> <ModulePrefs title="My Journal" description="Display the Owner's hi5
> Journal" title_url="http://suresh.hi5.com" author="Suresh"  
> author_email="
> sureshrk19@gmail.com" author_affiliation="hi5"  
> author_location="India">
> ...
> var p = opensocial.getEnvironment().getParams();
>          Hi5AuthToken = p['Hi5AuthToken'];
>          loadUsers();
>        }
>
>
> gadgets.util.registerOnLoadHandler(init);
>
>
>        function loadUsers() {
>          var req = opensocial.newDataRequest();
>          req.add(req.newFetchPersonRequest('OWNER'), 'owner');
>          req.add(req.newFetchPersonRequest('VIEWER'), 'viewer');
>          req.send(onLoadUsers);
>        }
>
> function onLoadUsers(dataResponse) {
>          var owner = dataResponse.get('owner').getData();
>          var viewer = dataResponse.get('viewer').getData();
>         var ownerId = owner.getDisplayName();
>
> -----------------------------------
>
> When I print 'ownerId' the value not same as my hi5 userid.
>
> Any pointers would be highly appreciated.
>
> --Suresh