question about adnroid app friendlist connect orkut data

10 views
Skip to first unread message

Chris Ma

unread,
Jun 29, 2010, 3:38:02 AM6/29/10
to OpenSocial Client Libraries
hello, I am new to Opensocial, I have downloaded oepnsocial java
client from http://code.google.com/p/opensocial-java-client/ I
build the android app friendlist which load friend list from google. I
have some questions about this app.
1
INFO/ActivityManager(71): Starting activity: Intent
{ act=android.intent.action.VIEW dat=https://www.google.com/accounts/
OAuthAuthorizeToken?oauth_token=4/OWa6KoKB2_IoNj31VO0lBvTlIPc-
&oauth_callback=xibin-app://
cmp=com.android.browser/.BrowserActivity }

where did we get oauth_token=4/OWa6KoKB2_IoNj31VO0lBvTlIPc-? I
checked the code.there is no such a string.


2 If I want to use this app to comunicate Orkut, I did change the
provider from Googleprovider to Orkutprovider,
what else should I change?

Thank you very much.

Chris Ma

unread,
Jun 29, 2010, 11:24:11 AM6/29/10
to OpenSocial Client Libraries
In the file: OpenSocialChooserAcitivty.java

protected void onListItemClick(ListView listView, View view, int
position,
long id) {
public void onClick(DialogInterface dialog, int
whichButton) {
try {
url =
authScheme.getAuthorizationUrl(scheme + "://");

After I changd the provider from GoogleProvider to OrkutProvider. I
checked url. its null?oauth_callback=xibin-app:// (I changed Scheme
to xibin-app://)

The original GoogleProvider url is
https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4/LGOsY1II2TJjcBVhr1MYqucBzRFf&oauth_callback=xibin-app://

My question is what else should I change to get such a URL for Orkut?



Jason (Google)

unread,
Jun 29, 2010, 12:13:23 PM6/29/10
to opensocial-cl...@googlegroups.com
When the client library was packaged several months ago, I didn't have 3-legged OAuth endpoints for orkut. I do now, however, but you'll have to download the library from svn trunk. Or you could replace src/org/opensocial/providers/OrkutProvider with the following:


After doing so, null should be replaced by the actual orkut endpoint, which is https://www.google.com/accounts/OAuthAuthorizeToken.

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


Chris Ma

unread,
Jun 29, 2010, 2:57:14 PM6/29/10
to OpenSocial Client Libraries
After download the turnk/java files, I did ant build build.xml in
eclipse(cant find jr6, I have to use jdk1.6 as jre path).
but I dont know how to export to jar file.
Thats why I downloaded the latest jar file(http://code.google.com/p/
opensocial-java-client/downloads/detail?name=opensocial-1.0.jar its
uploaded in Feb 2010)

Could you please tell me how to build opensocial.jar or just update
the jar file?

Jason (Google)

unread,
Jun 29, 2010, 3:02:40 PM6/29/10
to opensocial-cl...@googlegroups.com
If you downloaded the new library from trunk, just run ant dist. You should see a new dist directory with opensocial.jar in it.

- Jason


--

Chris Ma

unread,
Jun 29, 2010, 4:11:55 PM6/29/10
to OpenSocial Client Libraries
Thanks Jason, I got the jar file now . After I choose Orkut, there
is still an error:


06-29 19:43:35.705: ERROR/AndroidRuntime(314):
java.lang.RuntimeException: Error occured fetching request token

ERROR/AndroidRuntime(314): Caused by: net.oauth.OAuthProblemException:
HTTP status 400


This is server problem or URL problem?

Chris Ma

unread,
Jun 29, 2010, 4:15:52 PM6/29/10
to OpenSocial Client Libraries

I forgot to say that I copied OpenSocialActivity.java and
OpenSocivalChooserActivity.java to Friendlist folder( which has
FriendlistActivity.java and FriendListView.java) and added
<activity android:name=".OpenSocialChooserActivity"></activity>
<activity android:name=".OpenSocialActivity"></activity>
to manifest file. because I dont know how to build OpenSocialActivity
jar file before.

Reply all
Reply to author
Forward
0 new messages