Actually I think you are still stuck in thinking that the gadget runs on the
servers... it's not, it's converted to a plain old HTML page, which as you
know doesn't 'run' anywhere.

The gadget is just the HTML (+JS & CSS) view of what ever you're building,
so if a user installs your gadget on his/her profile, any interaction with
it should result in some communication with your server, and thus it will
container all the information you need already..

May I suggest that perhaps you could go create a profile on orkut (or
myspace, netlog, hi5, etc) and install a gadget there? it might help a lot
to have a visual example. Then you can inspect it's HTML & JS code and get
an idea of how this works. Also by looking at the tutorial I linked you this
all should become a lot clearer :)

Or if you prefer video, we have plenty of those on opensocial.org too, I
would suggest starting with this one:
http://www.opensocial.org/video/gdd08-london-opensocial

   -- Chris

On Fri, Sep 4, 2009 at 1:10 PM, Nishanth Nair <nair.nisha...@gmail.com>wrote:

> Ok Chris. So my requirement is that every day at 12AM, the gadget must send
> data to my server.
> So i need to schedule this inside the JS code in the gadget. AM I right?
> Also, can u point me to a code snippet where during an event , say a new
> friend is added, can trigger the gadget to
> send the data to my server?
>
> Thanks a lot for your support.
>
> On Fri, Sep 4, 2009 at 4:36 PM, Chris Chabot <chab...@google.com> wrote:
>
>> No, actually the gadget talks to your server, and not the other way around
>> :)
>>
>>
>> On Fri, Sep 4, 2009 at 12:31 PM, Nishanth Nair 
>> <nair.nisha...@gmail.com>wrote:
>>
>>> Chris, thanks a lot for the kind reply.
>>> So to talk to the gadget, the request must be initiated from my server?
>>> Cant the gadget send some data on its on , say when a new friend is
>>> added, to my server(to behave like an alert?)
>>>
>>> Thanks,
>>> Nishanth
>>>
>>>
>>>
>>> On Fri, Sep 4, 2009 at 3:50 PM, Chris Chabot <chab...@google.com> wrote:
>>>
>>>> An OpenSocial gadget is an xml file that contains js, css & html and not
>>>> actually an 'application' as I think you're assuming it is.
>>>>
>>>> Because it's these basic web components, you can do anything you could
>>>> do on a web page, but additionally there's a JavaScript API for common
>>>> social operations like fetching profile information & friends, creating
>>>> activities, etc. One of those API's is gadgets.io.makeRequest() which is
>>>> basically an Ajax call, with which you can retrieve information from your
>>>> own server.
>>>>
>>>> So there's no need for scheduled services, the web page like part is
>>>> included in the xml file, and all the additional logic runs on your own
>>>> servers.
>>>>
>>>> wiki.opensocial.org has lots of documentation available including:
>>>> Basic tutorial:
>>>> http://wiki.opensocial.org/index.php?title=OpenSocial_Tutorial
>>>> Introduction to makeRequest:
>>>> http://wiki.opensocial.org/index.php?title=Introduction_to_makeRequest
>>>>
>>>> And tons more at:
>>>> http://wiki.opensocial.org/index.php?title=Articles_%26_Tutorials
>>>>
>>>>     -- Chris
>>>>
>>>> On Fri, Sep 4, 2009 at 8:33 AM, Nishanth Nair 
>>>> <nair.nisha...@gmail.com>wrote:
>>>>
>>>>>  Arne/other experts,
>>>>>
>>>>> I have couple more doubts regarding the Opensocial Gadgets.
>>>>>
>>>>> 1. If I create a gadget and install as an App in orkut and other SNS
>>>>> which supports Opensocial,
>>>>> will the gadget be able to push data to my server as a scheduled
>>>>> service?
>>>>> 2. Can the gadget pull information from my server or can I feed
>>>>> information to the gadget as and when I like?
>>>>> 3. Can you direct me to a small demo or a tutorial on the web which
>>>>> does these 2 things?
>>>>> 4. What are the common restrictions applied on gadgets by SNS. mainly
>>>>> orkut mysapce hi5 etc?
>>>>>
>>>>> Thanks a lot for your help and continued support!!
>>>>>
>>>>> Nishanth
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Sep 3, 2009 at 12:04 AM, Arne Roomann-Kurrik <
>>>>> api.kur...@google.com> wrote:
>>>>>
>>>>>>
>>>>>> Hi Nishanth,
>>>>>>
>>>>>> On Sep 2, 7:55 am, Nishanth Nair <nair.nisha...@gmail.com> wrote:
>>>>>> > Hello experts,
>>>>>> >
>>>>>> > Here is what I need to achieve.
>>>>>> >
>>>>>> > - I need to create a single solution to read profile
>>>>>> information,friends
>>>>>> > list, scraps etc from profiles
>>>>>>
>>>>>> You can access all of this except for scraps from the OpenSocial REST/
>>>>>> RPC apis.  Note that scraps are an orkut-specific concept, and not
>>>>>> part of the OpenSocial specification.
>>>>>>
>>>>>> >
>>>>>> > (I have user name and pasword for all the profiles from which I need
>>>>>> info)
>>>>>> > of all SNS which supports OpenSocial and store it my Database.
>>>>>> >
>>>>>> > I just need the text data of these info to do some data based
>>>>>> analysis with
>>>>>> > the consent of the profile owners(they will provide their
>>>>>> >
>>>>>> > credentials to my software).
>>>>>>
>>>>>> This is a bad design.  Asking users to supply their passwords is a bad
>>>>>> idea, which is why OpenSocial uses OAuth to allow users to share their
>>>>>> information with your application without giving up their password.
>>>>>>
>>>>>> Here's a page describing how OAuth allows your app to access user
>>>>>> information in OpenSocial -
>>>>>> http://wiki.opensocial.org/index.php?title=OAuth_Use_Cases
>>>>>>
>>>>>> >
>>>>>> > Here are some questions that i have regarding this requirement.
>>>>>> >
>>>>>> > 1. Can Shindig server help me in anyway to write a single solution
>>>>>> which
>>>>>> > will connect to all the 25+ SNS which supports Opensocial and get
>>>>>> >
>>>>>> > the above mentioned data from them?
>>>>>>
>>>>>> No, you need an OpenSocial client library to access social data from a
>>>>>> network.
>>>>>>
>>>>>> >
>>>>>> > 2.Can Shindig server act as a single gadget rendering server for all
>>>>>> the SNS
>>>>>> > which supports Opensocial so that
>>>>>> >
>>>>>> > I dont have to install app individually on these sites?
>>>>>>
>>>>>> No, each of those networks utilizes a gadget renderer such as
>>>>>> Shindig.  As an app developer, you will not need to run Shindig.
>>>>>>
>>>>>> >
>>>>>> > 3.Do I need to write a gadget and install it as an App in all these
>>>>>> SNS
>>>>>> > manually and ask the users to add these apps to their profile
>>>>>> >
>>>>>> > and then only I can read data from thier profiles?
>>>>>>
>>>>>> For containers which only support 2-legged OAuth, you will need to
>>>>>> have users add an app to their profile.  For containers which support
>>>>>> 3-legged OAuth, you will be able to allow users to share their
>>>>>> information with your app without installing a gadget.
>>>>>>
>>>>>> In both cases, you will need to do some sort of registration with the
>>>>>> container in order to get an OAuth consumer key and secret.
>>>>>>
>>>>>> >
>>>>>> > 4.Is there anyway I can automatically install a gadget on a users
>>>>>> profile if
>>>>>> > have their username and password.
>>>>>>
>>>>>> Don't ask for their username and password.  Doing what you described
>>>>>> is equivalent to taking someone's email account information and
>>>>>> subscribing them automatically to mailing lists.  Use OAuth.  If you
>>>>>> need to prompt a user to install a gadget, most containers offer a URL
>>>>>> you can link to where the user can approve the gadget for access - see
>>>>>> http://osda.appspot.com for an example.
>>>>>>
>>>>>> > 5.can anybody propose a solution to achieve my goal?
>>>>>>
>>>>>> OAuth and the OpenSocial client libraries.
>>>>>>
>>>>>> > Thanks in advance...
>>>>>>
>>>>>> Sure, follow up if you have futher questions,
>>>>>> ~Arne
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Nishanth Nair
>>>>> Mobile: 91-9008855133
>>>>> http://nishanthnair.com
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards,
>>> Nishanth Nair
>>> Mobile: 91-9008855133
>>> http://nishanthnair.com
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Regards,
> Nishanth Nair
> Mobile: 91-9008855133
> http://nishanthnair.com
>
> >
>

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

Reply via email to