HI Dhaval and all others,

Thanks a ton for your support and resolving the problem! I was finally able
to flow the data in and out of xml and my php files seamlessly. It was a
great experience.

Special thanks to Dhaval for nicely detailing out the intricacies required
for the GET and POST request. Thanks a lot dude.

The app is now working and going great. Its still raw and we are going to
make it better and better till it becomes radiant! Please have a look at the
app and point out bugs.

PS: the functionality in the app is still minimal, we will increase them day
by day.

http://www.orkut.com/Main#Application.aspx?uid=13737324644056666681&appId=514397790385


Best Regards,

Prakhar Goel





On Tue, Jun 23, 2009 at 2:09 PM, Dhaval Pancholi <dhavalyo...@gmail.com>wrote:

>
> Hello Prahar it seems you are new to open social. Well Lets get the
> basics Clear over here
>
> For retrieving dynamic contents from server and showing to application
> canvas page involves following steps
>
> You can make request to your php file from xml .
> You pass all the parameters required to your php file from xml
> You have a callback function which fetches the html that is passed in
> php
>
>
> Your request can be either GET or POST
>
> If you intend to send a GET request
>
> /*cache clear code*/
>   var d = new Date();
>   var noCacheStr = d.getTime();
> /*end*/
> gadgets.io.makeRequest('http://yourwebsite.com/anything.php?
> cache='+noCacheStr
> +'&user_id='+orkut_opensocial_id,showUrlMessage,null);
>
> function showUrlMessage(data)
> {
>
> Here in "data" variable you have the dynamic content you wanted to
> show users and i think this is the part where you thought orkut made
> world more rounder.......
> alert(data);
>
> }
>
>
> If you intend to make a POST request
>
>  var params = {};
>  var postdata = {
>                          orkut_id=: orkut_opensocial_id,
>                         };
> params[gadgets.io.RequestParameters.METHOD] =
> gadgets.io.MethodType.POST;
> params[gadgets.io.RequestParameters.POST_DATA] =
> gadgets.io.encodeValues(postdata);
>
> gadgets.io.makeRequest('http://yourwebsite.com/anything.php?
> cache='+noCacheStr, showUrlMessage,params);
>
> function showUrlMessage(data)
> {
>
> Here in "data" variable you have the dynamic content you wanted to
> show users and i think this is the part where you thought orkut made
> world more rounder.......
> alert(data);
>
> }
>
> well about the parameter ?cache='+noCacheStr' is been appended so that
> next time the data should not be taken from cache
>
>
>
>
> I think the world is straight now Prakhar ....... :-)
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to opensocial-orkut@googlegroups.com
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to