ymkjp / opensocial-php-client

Automatically exported from code.google.com/p/opensocial-php-client
Apache License 2.0
0 stars 0 forks source link

HI5 -Fatal error when try batching (401) #57

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to authenticate user of HI5 and get users's parameters using batch:

1. params of HI5 Provider:
"https://api.hi5.com/oauth/requestToken",
"https://login.hi5.com/oauth/authorize",
"https://api.hi5.com/oauth/accessToken", "http://api.hi5.com/social/rest/",
"http://api.hi5.com/social/rpc", "Hi5", true, $httpProvider

2. connecting to a container:
session_start();
$localUserId = session_id();
$storage = new osapiFileStorage('/tmp/osapi');
$provider = new osapiHi5Provider();
$auth = osapiOAuth3Legged::performOAuthLogin("<my_consumer key>",
"<my_consumer secret>", $storage, $provider, $localUserId);
$osapi = new osapi($provider, $auth);

It performed well, then...

3. trying bathing
$request = $osapi->people->get(array('userId'=>'@me', 'groupId'=>'@self'));
$batch = $osapi->newBatch();
$batch->add($request, 'request_label');
$result = $batch->execute();

BUT, when trying to do $batch->execute() it returns:

Fatal error: Uncaught exception 'osapiException' with message 'Error
sending RPC request:
HTTP Status 401 - OAuth Authentication Failuresignature_invalid
message:
OAuth Authentication Failuresignature_invalid

What's wrong? Authentication is done well, but when try to batch execution
- returns 401 error. When I do the same operation for authenticate user of
MySpace and get users's parameters using batch, I haven't any problem with it.

The version of library is 1.0.1

Original issue reported on code.google.com by pema...@gmail.com on 28 Sep 2009 at 4:41