This is what I understood. 1. Users clicks and enters into the app. 2. We do a makerequest and get the userid (which is sent by orkut to my server) 3. A new iframe is opened, with src=my server 4. Then myserver starts a session, and adds userid to it (in the iframe) 5. From now on my server reads that session userid var to know the userid
I guess, I didn't misunderstood what you said. ??? I got a question here. How about clearing that session/cookie, when the user exits my app, in that newly created iframe. Thanks. On Feb 26, 9:56 pm, eduardorochabr <[email protected]> wrote: > Runaway, for you to know who the viewer are, the "conversation" always > starts from the container, in this case, with a makeRequest call from > the application XML. In other words, always starts from the client > browser viewing a standard OpenSocial app. > > Take a look at the ruby client code: > > http://code.google.com/p/opensocial-ruby-client/downloads/list > > http://opensocial-ruby-client.googlecode.com/files/gifts_sample_1.0.zip > > It's a Rails application, but you don't need to know Ruby to see the > important parts, which are: > > 1) public/gifts.xml: a standard javascript application, which calls > makeRequest, starting the conversion; > > 2) app/controllers/gifts_controller.rb, line 35: the makeRequest call > from 1) executes the method "iframe", which stores the essencial > parameters in the session; > > 3) The method above returns an iframe tag, which is rendered on the > user browser, pointing directly to your server. This way, you do not > need to use makeRequest at all after that, but you do need to use it > in step 1), in order to start the conversation; > > 4) app/controllers/gifts_controller.rb, line 46: the iframe initial > page is rendered here. Note how this method (index) uses the server- > side API, and also subsequent calls, like "give", etc. > > On 26 fev, 22:47, Runaway <[email protected]> wrote: > > > You mean My app make a request to container and get a response. This > > response have a param called "opensocial_viewer_id". > > And I use it in every request, don't I? > > > But I think the authentication and data request is together. > > > Or anybody can show me a request URL. > > > Thanks > > Tom > > > On Feb 26, 10:58 am, eduardorochabr <[email protected]> wrote: > > > > Runaway, the process starts by the container making a request to your > > > server-side application. This request will contain a parameter called > > > "opensocial_owner_id" and also "opensocial_viewer_id". > > > > On 26 fev, 13:19, Runaway <[email protected]> wrote: > > > > > I have read the source of Python and Java client. > > > > But in the sample, it use "USER_ID = '03067092798963641994'" as the > > > > first User ID. > > > > > I mean how I could get the User ID of who is using my app. > > > > > Is there a method to get current user? > > > > > Thanks > > > > Tom > > > > > PS: > > > > It seems the OpenSocial .NET Client is unavailable. I have deal with > > > > it by myself. > > > > > On 2月26日, 下午5时00分, Vijaya <[email protected]> wrote: > > > > > > You can use one of the REST client libraries > > > > > ( OpenSocial PHP Client > > > > > Library:http://code.google.com/p/opensocial-php-client/ > > > > > OpenSocial Java Client Library > > > > > :http://code.google.com/p/opensocial-java-client/ > > > > > OpenSocial Ruby Client Library > > > > > :http://code.google.com/p/opensocial-ruby-client/ > > > > > OpenSocial Python Client Library > > > > > :http://code.google.com/p/opensocial-python-client/) > > > > > to help you generate the OAuth parameters. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Orkut Developer Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en -~----------~----~----~----~------~----~------~--~---

