orkut registration of service

5 views
Skip to first unread message

Shlomo Rabinovitch

unread,
Jun 9, 2010, 11:35:11 AM6/9/10
to OpenSocial Client Libraries
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

Jason (Google)

unread,
Jun 10, 2010, 7:54:48 PM6/10/10
to opensocial-cl...@googlegroups.com
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


--
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 Rabinovitch

unread,
Jun 12, 2010, 3:59:37 AM6/12/10
to opensocial-cl...@googlegroups.com
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
--
Shlomo
+972-52-5747475

Jason (Google)

unread,
Jun 14, 2010, 2:30:49 PM6/14/10
to opensocial-cl...@googlegroups.com
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

Shlomo Rabinovitch

unread,
Jun 15, 2010, 4:58:36 AM6/15/10
to opensocial-cl...@googlegroups.com
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

Jason (Google)

unread,
Jun 15, 2010, 12:12:20 PM6/15/10
to opensocial-cl...@googlegroups.com
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

Shlomo Rabinovitch

unread,
Jun 16, 2010, 2:17:37 AM6/16/10
to opensocial-cl...@googlegroups.com
Thanks a lot!
 
Regards
Shlomo

Shlomo Rabinovitch

unread,
Jun 20, 2010, 5:29:01 AM6/20/10
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?
--
Shlomo
+972-52-5747475

Jason (Google)

unread,
Jun 29, 2010, 12:54:52 PM6/29/10
to opensocial-cl...@googlegroups.com
Hi Shlomo. This would be a better question for either the orkut or iGoogle developer groups. I believe that the iGoogle consumer keys are prefixed with google.com while orkut keys are prefixed with orkut.com. I don't have a gadget handy, but if you enter it in the form at the link I sent earlier, does it give you separate keys and secrets for the two containers? If not, then I would consult the discussion group for the particular container that you're working with.

- Jason
Reply all
Reply to author
Forward
0 new messages