I was just playing with Java and PHP OpenSocial client-libraries. But couldn't get them to work.
Actually, I tried built-in samples from the PHP library and they worked. However, when I changed their OAuth keys (consumer and secret), they stopped working.
I obtained my keys here https://www.google.com/gadgets/directory/verify