Thanks for the reply. I'm trying my hardest to avoid Zend like the plague..
I have 4 other social sites integrated with php except this one and none
use Zend.
I'm not a php expert but I've managed to find all im looking for and get it
to authenticate and display. The best thing I could probably do is just
show you the code. I see someone else has had the same issue but they were
using .net but they were able to put auth into the URL.. I'm just not sure
what that key is or where it is so I can add it.. I'm almost certain that
is my issue.
As far as authenticating I did a few print_r commands here and there and I
can view the token when it redirects me back.. I'm guessing that means its
authenticating. I don't know for sure since I've never done this before.
This is how my current authorization looks...
<code>
*<?php
require_once 'google-api-php-client/src/apiClient.php';
require_once 'google-api-php-client/src/contrib/apiOauth2Service.php';
session_start();
$client = new apiClient();
$client->setApplicationName("Google UserInfo PHP Starter Application");
// Visit https://code.google.com/apis/console?api=plus to generate your
// oauth2_client_id, oauth2_client_secret, and to register your
oauth2_redirect_uri.
$client->setClientId('**private**');
$client->setClientSecret('**private**');
$client->setRedirectUri('**private**');
$client->setDeveloperKey('private');
$oauth2 = new apiOauth2Service($client);
if (isset($_GET['code'])) {
$client->authenticate();
$_SESSION['token'] = $client->getAccessToken();
$redirect = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
header('Location: ' . filter_var($redirect, FILTER_SANITIZE_URL));
}
if (isset($_SESSION['token'])) {
$client->setAccessToken($_SESSION['token']);
}
if (isset($_REQUEST['logout'])) {
unset($_SESSION['token']);
$client->revokeToken();
}
if ($client->getAccessToken()) {
$user = $oauth2->userinfo->get();
// These fields are currently filtered through the PHP sanitize filters.
// See http://www.php.net/manual/en/filter.filters.sanitize.php
$email = filter_var($user['email'], FILTER_SANITIZE_EMAIL);
$img = filter_var($user['picture'], FILTER_VALIDATE_URL);
$personMarkup = "$email<div><img src='$img?sz=50'></div>";
// The access token may have been updated lazily.
$_SESSION['token'] = $client->getAccessToken();
} else {
$authUrl = $client->createAuthUrl();
}
print_r($oauth->debugInfo);
?>*
</code>
On Friday, August 10, 2012 2:47:06 PM UTC-4, James Callahan wrote:
>
> For starters im trying to implement the picasa webalbum into a website.
>
> Right now for authentication im using this...
>
> http://code.google.com/p/google-api-php-client/
>
> and I got my info for simple xml here...
>
> http://www.ibm.com/developerworks/library/x-picasalbum/index.html
>
> Everything works fine how I have it setup... I connect, authenticate with
> google, allow them to connect me, then it brings me back and displays my
> albums..
>
> The issue I have is it only shows the public albums. Even if I add *
> ?access=visible* to my url feed it doesn't show my private album. I've
> seen people say I need to add *auth* to the feed but I haven't seen an
> example of where I can actually find the auth key to put there.
>
> The site will be pulling the user's info that is logged in so I can't have
> anything static to one user.
>
> If I paste in the URL feed below into a browser " *
> http://picasaweb.google.com/data/feed/api/user/$userid?kind=photo* " I
> can see a list of all the photos from private and public while im logged
> into my google account... if I log out then I can only see the public..
> That makes sense. Now I can add *&access=visible* and that will show me
> all... or if I do *$access=public* then it will only show me public
>
> I don't understand why this doesn't work when im calling it.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Picasa Web Albums API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-picasa-data-api/-/e99m04QJ5rwJ.
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.