GetFriendTx friends = orkad.getFriendTF().getSelfFriends();
friends.setCount(20); // get up to 20 friends
BatchTransaction btx = orkad.newBatch();
btx.add(friends);
orkad.submitBatch(btx);
if (friends.hasError()) {
// handle error
}
int i;
say("You have " + String.valueOf(friends.getFriendsCount()) + " friend(s):");
for (i = 0; i < friends.getFriendsCount(); i++) {
OrkutPerson f = friends.getFriend(i);
System.out.println(f.getDisplayName());
}--
You received this message because you are subscribed to the Google Groups "orkut Developer Forum" group.
To post to this group, send email to opensoci...@googlegroups.com.
To unsubscribe from this group, send email to opensocial-ork...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en.
Hi Robson Dantas,
I am working on orkut-os-client 2.0 (java). It works fine for two
days, I got every thing like my profile, my friends list, my friends
profile etc. But i don't know why, it is not working from last two
days. exception is coming while Requesting authorization URL from
adapter. ie,
String authURL = orkad.requestAuthURL();
Please help me regarding this issue. I had already posted this issue
in forum, but i didn't get any response.
Log : -
*** Houston, we have a problem:
com.google.orkut.client.api.OrkutAdapterException: OrkutAdapter: Error
requesting OAuth authorization URL
at
com.google.orkut.client.api.DefaultOrkutAdapter.requestAuthURL(DefaultOrkutAdapter.java:
160)
at samples.Sample.main_inner(Sample.java:90)
at samples.Sample.main(Sample.java:650)
Caused by: net.oauth.OAuthProblemException: HTTP/1.1 400 Bad Request
at
net.oauth.client.OAuthResponseMessage.toOAuthProblemException(OAuthResponseMessage.java:
83)
at net.oauth.client.OAuthClient.invoke(OAuthClient.java:306)
at net.oauth.client.OAuthClient.invoke(OAuthClient.java:260)
at
net.oauth.client.OAuthClient.getRequestTokenResponse(OAuthClient.java:
190)
at
com.google.orkut.client.api.DefaultOrkutAdapter.requestAuthURL_inner(DefaultOrkutAdapter.java:
172)
at
com.google.orkut.client.api.DefaultOrkutAdapter.requestAuthURL(DefaultOrkutAdapter.java:
157)
... 2 more
Robson Dantas wrote:
> This is a fantastic update. But I´m really expecting to get another features
> inside the api: communities, for example, and of course documentation, since
> we already have php, .net, javascript, java libs running out there.
>
> Most of the work was done because me and other members reverse engineered
> the java library and fotoscrapr - I really spent so much time on this.
>
> See this thread - last july:
> http://www.mail-archive.com/opensoci...@googlegroups.com/msg10291.html
>
> And, of course, updating this page would be also great - profile data
> section:
> http://code.google.com/apis/orkut/docs/orkutdevguide/orkutdevguide-0.8.html
>
> Best
>
> Robson Dantas
>
> 2011/2/15 Bruno Oliveira ("btco") <bru...@google.com>
>
> > Hello developers,
> >
> > We've just published the new orkut Client Library 2.0 Developer Guide<http://code.google.com/apis/orkut/docs/clientlib/intro.html>
> > !
> >
> > It is essentially a guided tour through the main features of the orkut
> > Client Library and is intended to get you up and running with it as soon as
> > possible. If you've worked with version 1.1 of the library, you will notice
> > that we haven't changed the essence of the library but we have made it
> > easier to use and integrate with (for example, introducing the new *> > You can download the library from here<http://code.google.com/p/orkut-os-client>.
> > OrkutAdapter* class).
> >
> > Version 2.0 introduces a new download format: a binary-only distribution
> > with a single JAR file that you can just drop into your project's class
> > path, without any external dependencies (you can find it on the downloads
> > list on the right side of the page).
> >
> > If you've never used the library before, this might be a good time to take
> > a look at it! It essentially allows you to make requests to the orkut
> > servers on behalf of a user. That user must authenticate with orkut and
> > authorize your application to access his data, of course, and this is done
> > via OAuth.
> >
> > After authentication, you can issue requests to the orkut servers on behalf
> > of the user. Here are some of the things you can do:
> >
> > - Read person profiles
> > - Read scraps
> > - Write scraps
> > - Reply to scraps
> > - Read the activity stream
> > - Post to the activity stream
> > - Change the user's status text
> > - Issue friendship requests
> > - Accept/reject friendship requests
> > - Create, delete, update and list albums
> > - Create, delete, update and list photos in albums (yes, you can upload
> > new photos directly!)
> > - List and fetch videos
> > - Get upcoming birthday notifications for friends