Ouwcha, yeah that would be my mistake. There were some incompatibilities in the social API between shindig 1.0 and partuza trunk, so I took the last working revision and called that partuza-1.0. And while that did cover for the social api changes, I forgot to check the OAuth interface it seems!
I'll go fix that and do a partuza-1.0.1 release :) Thanks for the report & great feedback! -- Chris On Sun, Jul 5, 2009 at 6:32 PM, Loic Dachary <l...@dachary.org> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Chris Chabot wrote: > > Hey Loic, > > > > Using the 2 legged variant is quite simple, just change the $auth > > bit from: > > > > $auth = > > > osapiOAuth3Legged::performOAuthLogin('ddf4f9f7-f8e7-c7d9-afe4-c6e6c8e6eec4', > > '6f0e1a11ac45caed32d699f9e92ae959', $storage, $provider, > > $localUserId); to: new osapiOAuth2Legged("OAuth Key", "OAuth > > Secret", 'The User ID for which you want to do something'); > > > > Where the oauth key & token are the ones from the edit applications > > overview, and the user id on who's behalf you want to perform your > > actions. > > > > After that you can use the $osapis->appdata-> get / create / update > > / delete functions as you would expect to be able to use them :) > > > > Do note that most containers have the restriction that someone > > needs to have the app installed (identified by the oauth > > key/secret) to be able to retrieve and/or modify their data. > > This works beautifully on http://partuza.nl/. However, it fails > miserably on http://partuza.opensocial.dachary.org/ with the following > error. > > ( ! ) osapiException: Error decoding response body: > ( ! ) Fatal error: Declaration of > PartuzaOAuthLookupService::getSecurityToken() must be compatible with > that of OAuthLookupService::getSecurityToken() in > /usr/src/partuza/Shindig/PartuzaOAuthLookupService.php on line 25 > Call Stack > # Time Memory Function Location > 1 0.0005 96896 {main}( ) ../index.php:0 > 2 0.0141 1457464 JsonRpcServlet->doPost( ) ../index.php:118 > 3 0.0141 1457464 ApiServlet->getSecurityToken( ) > ../JsonRpcServlet.php:45 > 4 0.0142 1459368 __autoload( ) ../index.php:0 > 5 0.0146 1491024 require( > '/usr/src/partuza/Shindig/PartuzaOAuthLookupService.php' ) > ../index.php:74 > in /var/www/opensocial-php-client/osapi/io/osapiRpcIO.php on line 56 > Call Stack > # Time Memory Function Location > 1 0.0084 66840 {main}( ) ../listFriends.php:0 > 2 0.2793 1562380 osapiBatch->execute( ) ../listFriends.php:59 > 3 0.2879 1562380 osapiRpcIO::sendBatch( ) ../osapiBatch.php:60 > > I've looked into > shindig-1.0-incubating-php/src/common/OAuthLookupService.php and it shows: > > abstract public function getSecurityToken($oauthRequest, $appUrl, > $userId); > > while partuza/Shindig/PartuzaOAuthLookupService.php shows: > > public function getSecurityToken($oauthRequest, $appUrl, $userId, > $contentType) { > > It looks like a discrepancy between shindig and partuza. I double > checked that the installed versions are > > https://repository.apache.org/content/groups/public/org/apache/shindig/shindig/1.0-incubating/shindig-1.0-incubating-php.tar.gz > and > http://partuza.googlecode.com/files/partuza-1.0.0.tar.gz > > Any idea ? > > Cheers > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.9 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkpQ1ZsACgkQ8dLMyEl6F20CigCgj74+HfTbg5jLlvRraJV3VYUQ > ikQAoKNJadLG+yOpaa8teXsFuiNHa8+G > =Cjxl > -----END PGP SIGNATURE----- > >