Will the real Orkut PHP library please stand up?

8 views
Skip to first unread message

José Miguel Hernandez

unread,
Jun 23, 2011, 6:12:21 PM6/23/11
to orkut-ph...@googlegroups.com
Hello all, 

I've been trying to get an app ported over to Orkut (from facebook) and I noticed there are at least two open source PHP libraries in the wild:


My contact at google pointed me to this one, though I had already partially implemented an integration using the "opensocial-php-client", which seems to have quite a few more stars on code.google.

I'd like to know...

1. Are the developers of these two projects are even aware of the other project?
2. Has anyone on this google group had any exposure to or success with the other library?
3. Is this library still being maintained and updated?
4. Any compelling reasons I should use one vs. the other?

I appreciate any advice or comments, 
Jose M. Hernandez

Robson Dantas

unread,
Jun 23, 2011, 10:58:41 PM6/23/11
to orkut-ph...@googlegroups.com
Hi Jose, thanks for getting in touch. Few comments:

1- Yes, we are aware of that. For the java version we have the same situation.

opensocial-php-client was created by Google, developed by Chris Chabot. It was designed for 2legged oauth, but can be modified to run 3legged.

This project (orkut-os-client-php) was designed based on the library above(oauth code) and handles just 3legged.

I spent several hours reverse engineering the java library orkut team created, in order to get things up and running.

2- I decided creating this lib after figuring out the amount of work to make things happen on Google's libraries. It is also good to remember there isn't any update there in the last 10months.

You need to handle captcha, rewrite messages class to make scraps work (reading an sending) and so on.

This things are handled by orkut-os-client-php and there are working samples available.

3- Yes, I keep maintaining this library writing new stuff and answering messages. Published an app called "scrapall" under samples folder recently.

In the end, it is up to you:

- If you are planning to develop a 3legged oauth app, then my advice is to use this lib;

- if you are planning 2legged, go to Google's lib.

It is also good to mention that for 2legged you need an opensocial app running on Orkut.

Let me know if you need any additional info.

Best

Robson Dantas
@robsondantas

Sent from my iPhone

José Miguel Hernandez

unread,
Jun 27, 2011, 4:14:59 PM6/27/11
to orkut-ph...@googlegroups.com
Thanks for the prompt and thorough feedback. 

I hit a dead-end with the opensocial-php-client. For some reason, I had everything working and then the following week I couldn't get auth working within my app environment anymore, yet it did work when I copied everything over to my personal web server and started from scratch. I escalated the issue to a Google employee at Orkut in Brazil since we first assumed there might have been a blacklist issue on our app domain. Turns out, there wasn't a blacklist issue but what was interesting is that the Orkut employees had for the most part no experience with the opensocial-php-client - and instead they referred me here to your implementation. They also told me that there is no official support for any of the libraries aside from the Java library.

Anyway, I'm going to try again to port my app to Orkut using this library over the next day or two (if I don't get sidetracked). If I make any progress, I'll let you know.

Thanks, 
Jose M. Hernandez

Robson Dantas

unread,
Jun 27, 2011, 4:37:28 PM6/27/11
to orkut-ph...@googlegroups.com
Hi!

I've been developing for Orkut in the last three years, and got to know almost everything about the platform.

When opensocial was released, Google was pushing hard its adoption and many libraries were out - php, java, ruby, as3, and others. During that time, just 2legged was available and after some time, efforts started to get minimum, and projects spreading around.

Months later, Orkut team released 3legged oauth and they launched a library from scratch, called OS-Client ( http://code.google.com/p/orkut-os-client ), which is Java-based. For some reason, the 2legged oauth version wasn't considered (or Orkut team didn't know about that).

I spent a lot of time reverse engineering Java OS client to create this php library, since there isn't any documentation available, and because of that other people could develop a .NET, C++ and Javascript libs.

Today, got to know that Bruno (developer relations - Orkut - Brazil), released a documentation, where he mentions what you said - they just support Java based version, which makes sense. More info here: http://code.google.com/apis/orkut/docs/index.html

As far as I can tell you:

1- There is a blacklist, based on API quotas - if you hit api quotas, you key gets blacklisted for a while;
2- Depending the amount of calls you hit on Google's servers, you ip can get blacklisted, and you will be asked to solve captchas;
3- If you infringe Orkut TOS, you can get blacklisted;

So, before starting developing, make sure you read everything, and if you believe that quota is not enough, Google can help you on that.

For the rest, if you need anything, let me know. Hurrying with stuff, but answering as soon as possible.

With regards,

Robson Dantas
@robsondantas

2011/6/27 José Miguel Hernandez <jozec...@gmail.com>

José Miguel Hernandez

unread,
Jul 6, 2011, 6:24:04 PM7/6/11
to orkut-ph...@googlegroups.com
Thanks again Robson, I was in fact working with Bruno @ Google and did notice this update to the docs.

So far so good, I have your lib at least partially working at the moment with my app. I will update if I have any more observations or questions. 

Thanks, 
Jose M. Hernandez
Reply all
Reply to author
Forward
0 new messages