opensocial registration of service

2 views
Skip to first unread message

Shlomo Rabinovitch

unread,
Jun 21, 2010, 3:04:30 AM6/21/10
to opensocial-cl...@googlegroups.com
Hi,

I'm using the opensocial client library 1.0. i got the registration to the Orkut sandbox of my server and have the key and secret. i can get the person, the friends, but no more, no status no twitt, can't set status and tweet also.
Now i'm trying to access Gmail with the following example.

    provider = new GoogleProvider();
    userScheme = new OAuth2LeggedScheme(OAuthConsumerKey, OAuthConsumerSecret, OSID);
    client = new Client(provider, userScheme);
    Request request = PeopleService.getViewer();
    Response response =  client.send(request);
    Person viewer = response.getEntry();
    System.out.println ("<<<<<<<<<< " + viewer + " >>>>>>>>>>");

but can't get the access, the answer is

[{ "id": "key", "error": { "message": "notImplemented: Person fetching is not supported for: ORKUT",  "code": 501 }}]}

what am i doing wrong?
thanks
Shlomo



---------- Forwarded message ----------
From: Shlomo Rabinovitch <shlomor...@gmail.com>
Date: Sun, Jun 20, 2010 at 12:29 PM
Subject: Re: orkut registration of service
To: opensocial-cl...@googlegroups.com


The link https://www.google.com/gadgets/directory/verify. seems a same as registration to ORkut. If i already registerred ang dog my key and secret, tryed them in Orkut, can i use them to get access to gmail? or shall i register in different way or differrent gadget?




On Wed, Jun 16, 2010 at 9:17 AM, Shlomo Rabinovitch <shlomor...@gmail.com> wrote:
Thanks a lot!
 
Regards
Shlomo


 
On Tue, Jun 15, 2010 at 6:12 PM, Jason (Google) <apij...@google.com> wrote:
Authentication schemes are not specific to a provider -- iGoogle supports both 2-legged OAuth and 3-legged OAuth. You should be able to get the consumer key and secret for your gadget https://www.google.com/gadgets/directory/verify.

With 2-legged OAuth in particular, many containers verify that the user whose profile data is being fetched has the gadget installed. I know orkut does this, and I wouldn't be surprised if iGoogle works similarly, so keep this in mind. You can also use the iGoogle key and secret in test/org/opensocial/online/PeopleTest.java.

- Jason

On Tue, Jun 15, 2010 at 1:58 AM, Shlomo Rabinovitch <shlomor...@gmail.com> wrote:
I'm using the OpenSocial client library of Java from the site you have pointed. Now i have another issue, i have tried to use Google provider ther, asking for the profile and the answer i have got is that it doesnt work. Maybe because i'm using the Oauth2scheme which is Orkut made? but if i shall use other authscheme with gmail specific key and secret, how can i get them? where from?
i'm trying to build a server to access the data from profile, and set some fields there on behalf of users.

Regards
Shlomo


On Mon, Jun 14, 2010 at 8:30 PM, Jason (Google) <apij...@google.com> wrote:
If you're using the orkut-specific client library, please post your question in the orkut application developer discussion group:

If you have any issues using the general OpenSocial client library for Java at http://code.google.com/p/opensocial-java-client/, please let me know. This library is currently at version 1.0. I haven't tested recently, but I believe it supports fetching but not setting user status in orkut.

- Jason

On Sat, Jun 12, 2010 at 12:59 AM, Shlomo Rabinovitch <shlomor...@gmail.com> wrote:
Thanks Jason
i got the opensocial ID, now i get the access (working in sandbox, because i have another problem - cant see the registerred application in the application directory).
But in sadnbox i can see the profile. now i'm trying to go step forward and get/set the status. i do not see in my client library version 1.0 the examples to do that. can you help?
i do not use the desctop library that released at May-25, it's for desctop and using apache as far as i understood.
so i'm using the client library 1.2
Thanks


On Fri, Jun 11, 2010 at 2:54 AM, Jason (Google) <apij...@google.com> wrote:
I'm guessing that your particular problem stems from using the wrong ID. The actual orkut ID is not a valid OpenSocial ID -- you'll need the actual OpenSocial ID, which you can get fairly easily by installing the OpenSocial Dev App on your profile and running it. It should make a request for the VIEWER info and output the ID (person.getId()).


Unfortunately, if you don't know the OpenSocial ID ahead of time, 2-legged OAuth doesn't do you a lot of good. You may need to look into the 3-legged implementation, especially if you're developing a web app. See the sample Java 3-legged demo in demos/ThirdLeg.

- Jason


On Wed, Jun 9, 2010 at 8:35 AM, Shlomo Rabinovitch <shlomor...@gmail.com> wrote:
Hi,
I have built some small service in Java that shall connect to the
orkut and update, display , transfer further the information about the
users that want to be part of the service. when I'm trying to register
the service, i getting the both keys (orkutOAuthConsumerKey and
orkutOAuthConsumerSecret), and the registration completed
successfully. then I'm using the orkut ID that i can see on my user
screen. So the application uses  key,secret, and the user ID, trying
to communicate with the user profile (using OAuth scheme 2). I'm
getting an empty response and in the communication OK, there is
description : [{"id":"key","error":{"message":"unauthorized: Invalid
user, user lookup returned invalid user.","data":
{"errorType":"invalidUser"},"code":401}}]. I entered as user into
orkut, and registered the service (using sandbox), but steel the same
behavior. Any help? any hint? maybe i shall use user opensocial ID
instead of the orkut ID? if so, how can I get one, say I'm Orkut user
and want to know my opensocial ID?

Thanks in advance

--
You received this message because you are subscribed to the Google Groups "OpenSocial Client Libraries" group.
To post to this group, send email to opensocial-cl...@googlegroups.com.
To unsubscribe from this group, send email to opensocial-client-l...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensocial-client-libraries?hl=en.


--
You received this message because you are subscribed to the Google Groups "OpenSocial Client Libraries" group.
To post to this group, send email to opensocial-cl...@googlegroups.com.
To unsubscribe from this group, send email to opensocial-client-l...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensocial-client-libraries?hl=en.



--
Shlomo
+972-52-5747475

--
You received this message because you are subscribed to the Google Groups "OpenSocial Client Libraries" group.
To post to this group, send email to opensocial-cl...@googlegroups.com.
To unsubscribe from this group, send email to opensocial-client-l...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensocial-client-libraries?hl=en.

--
You received this message because you are subscribed to the Google Groups "OpenSocial Client Libraries" group.
To post to this group, send email to opensocial-cl...@googlegroups.com.
To unsubscribe from this group, send email to opensocial-client-l...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensocial-client-libraries?hl=en.



--
Shlomo
+972-52-5747475

--
You received this message because you are subscribed to the Google Groups "OpenSocial Client Libraries" group.
To post to this group, send email to opensocial-cl...@googlegroups.com.
To unsubscribe from this group, send email to opensocial-client-l...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensocial-client-libraries?hl=en.

--
You received this message because you are subscribed to the Google Groups "OpenSocial Client Libraries" group.
To post to this group, send email to opensocial-cl...@googlegroups.com.
To unsubscribe from this group, send email to opensocial-client-l...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensocial-client-libraries?hl=en.



--
Shlomo
+972-52-5747475



--
Shlomo
+972-52-5747475



--
Shlomo
+972-52-5747475
Reply all
Reply to author
Forward
0 new messages