Hello all,
I have a problem with retrieving a session token from the Google
Picasa API. The moment I request it the server returns an "502 Bad
Gateway (nginx/0.5.35)" error. The first step to obtain the normal
token goes without a problem.
The PHP code I use is strongly based on the examples on the
documentation and works without problems on other server
configurations. So, i guess it is a configuration problem. However: i
have no idea what it could be!
The (relevant) code that i am using to produce this error:
$session = new Zend_Session_Namespace('picasa');
if( !isset($session->sessionToken) )
{
if( isset($_GET['token']) )
{
// This call will yield the 502 Bad Gateway error
$session->sessionToken =
Zend_Gdata_AuthSub::getAuthSubSessionToken( $_GET
['token'] );
}
else
{
$nextUrl = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER
['REQUEST_URI'];
$scope = 'http://picasaweb.google.com/data';
$secure = 0;
$session = 1;
$authSubUrl = Zend_Gdata_AuthSub::getAuthSubTokenUri($nextUrl,
$scope, $secure, $session);
header('location: ' . $authSubUrl);
exit;
}
}
if( isset($session->sessionToken) )
{
// Thus, script will never reach this far
$client = Zend_Gdata_AuthSub::getHttpClient($session-
>sessionToken);
}
Thanks!
Maurad3r
--
You received this message because you are subscribed to the Google Groups
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-picasa-data-api?hl=en.