21 messages in com.googlegroups.opensocial-api[OpenSocial] Re: integrate Server sid...
FromSent OnAttachments
afaq15 May 2008 00:27 
Shubhajyoti Ghosh15 May 2008 03:18 
rana das15 May 2008 03:27 
afaq15 May 2008 03:44 
afaq15 May 2008 04:05 
justin kruger15 May 2008 05:16 
afaq15 May 2008 06:38 
Renato Mangini15 May 2008 06:52 
Arne Roomann-Kurrik15 May 2008 09:59 
Arne Roomann-Kurrik15 May 2008 09:59 
justin kruger15 May 2008 10:38 
Balaji Srinivasan15 May 2008 10:46 
Balaji Srinivasan15 May 2008 10:48 
Balaji Srinivasan15 May 2008 10:49 
Balaji Srinivasan15 May 2008 10:49 
Renato Mangini15 May 2008 10:54 
Balaji Srinivasan15 May 2008 11:45 
Balaji Srinivasan15 May 2008 11:45 
Shubhajyoti Ghosh15 May 2008 23:15 
Renato Mangini16 May 2008 06:24 
buzypi22 May 2008 12:02 
Subject:[OpenSocial] Re: integrate Server side code
From:buzypi (buz@gmail.com)
Date:05/22/2008 12:02:04 PM
List:com.googlegroups.opensocial-api

Hi Afaq,

It is possible to make your gadget interact with PHP or some other language on the server-side.

Here is the flow: 1. You define what callback function to call (say foo) in _IG_RegisterOnloadHandler. 2. When the function foo is called, you make OpenSocial requests to fetch necessary information. 3. Define a second callback say bar, which is called when the OpenSocial information is fetched. 4. The bar function now makes a call gadgets.io.makeRequest to your server with all the information posted using POST_DATA param and define a new callback that is called when the request to your server completes. 5. The server sends back HTML DOM or JSON data that is appended into the page in the 3rd callback.

As Renato said, there does not need to be OpenSocial specific code on your server. For the server it is just a plain HTTP request.

On May 15, 12:27 pm, afaq <Afaq@gmail.com> wrote:

hi,

I have read examples of google for opensocial at (http:// code.google.com/apis/opensocial/) All these examples are working as Gadgets with structure as : <?xml version="1.0" encoding="UTF-8"?><Module><ModulePrefs title="hello world example" /><Content type="html"><![CDATA[Hello, world!]]></Content></Module>

Can we write open social code directly in server side pages like PHP or APSX pages? Without writing a gadgets.. or how to integrate Server side code of ASPX with opensocial?

In otherwords, i want to create an application likehttp://booksiread.org/ Where server side is integrated with opensocial.

Any ideas or feedback......

Regards, Afaq