How can I retrieve Viewers ID?

0 views
Skip to first unread message

HOOZ

unread,
Nov 2, 2009, 9:45:45 AM11/2/09
to opensocial-client-libraries
I am writing an application for mobile phones with java. This program
will be downloaded and installed to the device.
I wanna use 2-legged OAuth, so how can I retrieve VIEWER ID? In order
to connect and reach to see the friend list of the user wants to
login, I need the VIEWER ID of that user.

Here is an example:

c.setProperty(OpenSocialClient.Property.CONSUMER_SECRET,
"uynAeXiWTisflWX99KU1D2q5");
c.setProperty(OpenSocialClient.Property.CONSUMER_KEY, "orkut.com:
623061448914");
c.setProperty(OpenSocialClient.Property.VIEWER_ID,
"03067092798963641994");

In this example the VIEWER ID is already known before, but
how?? ..with doing some magic after the user enters his nickname and
password of his orkut account??

Sincerely,

Hamdi

Jesse

unread,
Nov 2, 2009, 12:33:24 PM11/2/09
to opensocial-cl...@googlegroups.com
Typically this would be passed to you via the container that renders the app.

Since you are living completely outside the container this might be a case where you need to use 3 leggedOAuth. The idea is that you do NOT have the user enter their info for these social networks on your site but via the method provided by the containers. With 3 legged once a user has linked your app, you will be sent back a request token which can be used for all transactions.

Jesse
Reply all
Reply to author
Forward
0 new messages