Would you know how I can find the attributes of the requestUrl?  In my 
original code I did 

  $feedURL = 
"http://picasaweb.google.com/data/feed/api/user/jamestcallahanphotography/?kind=photo&access=visible";;
   $sxml = simplexml_load_file($feedURL);

then I could do a foreach and echo $feed->title  or $feed->href  etc. or 
something like $feed['title']

I just tried something like  $sxml = new SimpleXMLElement($requestUrl);  
right after $requestUrl

but get " parser error : Start tag expected, '<' not found in"

I thought I'd be able to figure it out but guess im having no luck. I feel 
like its probably something super simple that im just not getting :(


thanks

On Tuesday, August 14, 2012 5:33:02 PM UTC-4, Mike Erickson wrote:
>
> I accept your promise of future kindness, and wish you happy coding. Glad 
> I could help, and now I know how that tool works. Fun!
>
> -m.e.
>
>
> On Tue, Aug 14, 2012 at 2:28 PM, James Callahan 
> <jamestcallah...@gmail.com<javascript:>
> > wrote:
>
>> if I had an award to give you would soon receive one. I don't have images 
>> showing but I do have text on the page showing all 3 albums of mine.. 2 
>> being public and 1 private. Now I can work on redoing the part that shows 
>> the images because im getting some errors.. probably because I was 
>> requesting a url and then pulling data from it. Should be able to figure it 
>> out and if anyone else wants to accomplish this I can post the entire code.
>>
>> thanks a bunch!
>>
>>
>> On Tuesday, August 14, 2012 4:29:23 PM UTC-4, Mike Erickson wrote:
>>
>>> This isn't going to win any awards, but at least it returns private 
>>> albums.  Let me know if this doesn't work for you. 
>>>
>>> session_start();
>>> $client = new apiClient();
>>> $client->setApplicationName("**Google UserInfo PHP Starter 
>>> Application");
>>> // Visit 
>>> https://code.google.com/apis/**console?api=plus<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('**********');
>>>  $client->setClientSecret('********');
>>>  $client->setRedirectUri('**********');
>>>  $client->setDeveloperKey('**********');
>>>
>>> //  Add picasaweb scope!
>>>
>>>  
>>> $client->setScopes(array('htt**ps://picasaweb.google.com/**data')<https://picasaweb.google.com/data%27%29>
>>> );
>>>  $oauth2 = new apiOauth2Service($client);
>>> if (isset($_GET['code'])) {
>>>   $client->authenticate();
>>>   $_SESSION['token'] = $client->getAccessToken();
>>>   header('Location: http://' . $_SERVER['HTTP_HOST'] . 
>>> $_SERVER['PHP_SELF']);
>>> }
>>> if (isset($_SESSION['token'])) {
>>>  $client->setAccessToken($_**SESSION['token']);
>>> }
>>> if (isset($_REQUEST['logout'])) {
>>>   unset($_SESSION['token']);
>>>   $client->revokeToken();
>>> }
>>> if ($client->getAccessToken()) {
>>>   print "<div>Get Access Token.</div><br>";
>>>
>>>   
>>> //////////////////////////////**//////////////
>>> // This is the good stuff.
>>> //////////////////////////////**/////////////
>>>   $requestUrl = "https://picasaweb.google.com/**
>>> data/feed/api/user/default?**kind=album&v=2&access=private<https://picasaweb.google.com/data/feed/api/user/default?kind=album&v=2&access=private>
>>> "**;
>>>   $request = new apiHttpRequest($requestUrl);
>>>   $curl = new apiCurlIO();
>>>   $response = $curl->authenticatedRequest($**request);
>>>   print("Response Code " . $response->**getResponseHttpCode() . 
>>> "</br>");
>>>   print("Response body " . $response->getResponseBody() . "</br>");
>>>
>>>   // The access token may have been updated lazily.
>>>   $_SESSION['token'] = $client->getAccessToken();
>>> } else {
>>>   $authUrl = $client->createAuthUrl();
>>>   print "<a href='$authUrl'>Connect Me!</a>";
>>> }
>>>
>>>
>>> -m.e.
>>>
>>>
>>>
>>> On Tue, Aug 14, 2012 at 11:40 AM, James Callahan <jamestcallah...@**
>>> gmail.com> wrote:
>>>
>>>> awesome thanks! im not good with php but managed to get this far.
>>>>
>>>>
>>>> On Tuesday, August 14, 2012 1:50:44 PM UTC-4, Mike Erickson wrote:
>>>>
>>>>> Ah, I think I understand now. The authkey is a unique identifier that 
>>>>> gives you access to a specific album, but does not give you general 
>>>>> access 
>>>>> to private albums. It seems you were trying to get around the problem 
>>>>> that 
>>>>> your authentication doesn't appear to be making it into your request 
>>>>> headers.
>>>>>
>>>>> One way to make sure your auth headers are set is to make a query for 
>>>>> an "only you" album. If your request is not authenticated, it won't work, 
>>>>> but if it is then the album feed will work fine. 
>>>>>
>>>>> I'll take a look at your code sample again this afternoon. I wasn't 
>>>>> able to get t working last time, but I'm not very good with PHP.
>>>>> On Aug 14, 2012 8:03 AM, "James Callahan" <jamestcallah...@**gmail.com> 
>>>>> wrote:
>>>>>
>>>>>> So I looked further into the picasa api and im wondering if what im 
>>>>>> trying to do is even possible within the api. First of all I had my 
>>>>>> album 
>>>>>> share to "only me" so I moved it to "Limited, must have link" which then 
>>>>>> I 
>>>>>> noticed is where google gives you an authkey in the link they provide so 
>>>>>> people can view the album. So now im wondering does the api have a call 
>>>>>> for 
>>>>>> that generated number or is it just random and I can't access it?
>>>>>>
>>>>>> I've seen others talk about getting the authkey but they are putting 
>>>>>> it in themselves.. and I think their authkey is actually just the album 
>>>>>> authkey.... You can move multiple albums into the unlisted section and I 
>>>>>> believe that authkey is what gives you visibility.
>>>>>>
>>>>>> This is the link they give me to the unlisted    
>>>>>> https://picasaweb.google.com/**1**08822373128819829392/Picasa?**au**
>>>>>> thkey=randomgeneratedkey<https://picasaweb.google.com/108822373128819829392/Picasa?authkey=randomgeneratedkey>
>>>>>>
>>>>>> And this is the feedURL that I am using        
>>>>>> http://picasaweb.google.com/**da**ta/feed/api/user/$userid/?**kind**
>>>>>> =photo&access=visible&**authkey=**randomgeneratedkey<http://picasaweb.google.com/data/feed/api/user/$userid/?kind=photo&access=visible&authkey=randomgeneratedkey>
>>>>>>
>>>>>> my thoughts at first were... maybe I can just use the unlisted link 
>>>>>> but realised its just a web address I can't pull from. Im starting to 
>>>>>> think 
>>>>>> what I want done can't be done yet.
>>>>>>
>>>>>> this makes me sad :(
>>>>>>
>>>>>> On Monday, August 13, 2012 2:13:46 PM UTC-4, Mike Erickson wrote:
>>>>>>>
>>>>>>> It seems like you are just trying to find the authkey param the 
>>>>>>> photo Feed? Your best bet is to find the feed element then use 
>>>>>>> parse_url <http://php.net/manual/en/function.parse-url.php> to pull 
>>>>>>> off the query string. Then you can split the queries and grab the 
>>>>>>> authkey. 
>>>>>>>
>>>>>>> Sounds like a reasonable solution?
>>>>>>> -Mike
>>>>>>>
>>>>>>> -m.e.
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Aug 13, 2012 at 11:01 AM, James Callahan <jamestcallah...@**
>>>>>>> gmail.com> wrote:
>>>>>>>
>>>>>>>> working with the picasa API with php and simple xml.
>>>>>>>>
>>>>>>>> I currently have my feed like so...
>>>>>>>>
>>>>>>>>     $feedURL = "http://picasaweb.google.com/**d****
>>>>>>>> ata/feed/api/user/$userid/?**kin****d=photo<http://picasaweb.google.com/data/feed/api/user/$userid/?kind=photo>
>>>>>>>> ";
>>>>>>>>     $sxml = simplexml_load_file($feedURL);
>>>>>>>>
>>>>>>>>
>>>>>>>> is there a way I can display that info on the page with a print_r? 
>>>>>>>> I want to see every single attribute, tag, etc. that there is with 
>>>>>>>> that 
>>>>>>>> link so I can try and figure out how to get the authkey. I see it 
>>>>>>>> added at 
>>>>>>>> the end of the feedURL in [href] when I do an echo on the $sxml
>>>>>>>>
>>>>>>>> something like this...
>>>>>>>>
>>>>>>>> [link] => Array
>>>>>>>>                         (
>>>>>>>>                             [0] => SimpleXMLElement Object
>>>>>>>>                                 (
>>>>>>>>                                     [@attributes] => Array
>>>>>>>>                                         (
>>>>>>>>                                             [rel] => 
>>>>>>>> http://schemas.google.com/g/**20****05#feed 
>>>>>>>> <http://schemas.google.com/g/2005#feed>
>>>>>>>>                                             [type] => 
>>>>>>>> application/atom+xml
>>>>>>>>                                             [href] => 
>>>>>>>> http://picasaweb.google.com/**da****ta/feed/api/user/**1088223731288****19829392/albumid/**5774774167439****695457/photoid/**577477417124793****8738?authkey=**Hgi37aezOS0
>>>>>>>>  
>>>>>>>> <http://picasaweb.google.com/data/feed/api/user/108822373128819829392/albumid/5774774167439695457/photoid/5774774171247938738?authkey=Hgi37aezOS0>
>>>>>>>>                                         )
>>>>>>>>
>>>>>>>>                                 )
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> I need to figure out how to get that authkey into a variable so I 
>>>>>>>> can add it to the feedURL.
>>>>>>>>
>>>>>>>> on the site I have people will be logging in with their credentials 
>>>>>>>> and right now they can but they can't see their private albums in 
>>>>>>>> picasa.
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> 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/**ms****g/google-picasa-data-api/-/**
>>>>>>>> CBb****AgjZwY5kJ<https://groups.google.com/d/msg/google-picasa-data-api/-/CBbAgjZwY5kJ>
>>>>>>>> .
>>>>>>>> To post to this group, send email to google-pica...@**googlegroups.
>>>>>>>> **co**m.
>>>>>>>> To unsubscribe from this group, send email to 
>>>>>>>> google-picasa-data-api+**unsubsc****r...@googlegroups.com.
>>>>>>>> For more options, visit this group at http://groups.google.com/**
>>>>>>>> group****/google-picasa-data-api?**hl=en<http://groups.google.com/group/google-picasa-data-api?hl=en>
>>>>>>>> .
>>>>>>>>
>>>>>>>
>>>>>>>  -- 
>>>>>> 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/
>>>>>> **ms**g/google-picasa-data-api/-/**vQ2**rwxYE7DwJ<https://groups.google.com/d/msg/google-picasa-data-api/-/vQ2rwxYE7DwJ>
>>>>>> .
>>>>>> To post to this group, send email to google-pica...@**googlegroups.**
>>>>>> com.
>>>>>> To unsubscribe from this group, send email to google-picasa-data-api+
>>>>>> **unsubsc**r...@googlegroups.com.
>>>>>> For more options, visit this group at http://groups.google.com/**
>>>>>> group**/google-picasa-data-api?**hl=en<http://groups.google.com/group/google-picasa-data-api?hl=en>
>>>>>> .
>>>>>>
>>>>>  -- 
>>>> 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/-/**A5I0hHhk4IEJ<https://groups.google.com/d/msg/google-picasa-data-api/-/A5I0hHhk4IEJ>
>>>> .
>>>>
>>>> To post to this group, send email to google-pica...@**googlegroups.com.
>>>> To unsubscribe from this group, send email to google-picasa-data-api+**
>>>> unsubscr...@googlegroups.com.
>>>> For more options, visit this group at http://groups.google.com/**
>>>> group/google-picasa-data-api?**hl=en<http://groups.google.com/group/google-picasa-data-api?hl=en>
>>>> .
>>>>
>>>
>>>  -- 
>> 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/-/DG-5VHfmPvEJ.
>>
>> To post to this group, send email to 
>> google-pica...@googlegroups.com<javascript:>
>> .
>> To unsubscribe from this group, send email to 
>> google-picasa-data-api+unsubscr...@googlegroups.com <javascript:>.
>> For more options, visit this group at 
>> http://groups.google.com/group/google-picasa-data-api?hl=en.
>>
>
>

-- 
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/-/iEtaLXTVWQwJ.
To post to this group, send email to google-picasa-data-api@googlegroups.com.
To unsubscribe from this group, send email to 
google-picasa-data-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-picasa-data-api?hl=en.

Reply via email to