Hi, try changing "entry" to "feed"
Like so: $uri = 'https://picasaweb.google.com/data/*feed*
/api/user/default/albumid/*{album-id}*?fields=media:group&alt=json';


/Robert

On Sunday, 16 October 2016 17:40:54 UTC+2, Murtaza vhora wrote:
>
> I am trying to retrieve all album pics using cURL.
> I used OAuth 2 for authenticating the user and used following cURL code to 
> retrive photos. But I am only getting only 1 entry instead of all photos.
>
>
> $uri = 'https://picasaweb.google.com/data/entry/api/user/default/albumid/
> *{album-id}*?fields=media:group&alt=json';
> $ch = curl_init();
>     curl_setopt_array( $ch, 
>                  array( CURLOPT_CUSTOMREQUEST => 'GET'
>                        , CURLOPT_URL => $uri
>                        , CURLOPT_HTTPHEADER => array( 'GData-Version: 2'
>                                                      , 'Authorization: 
> Bearer '. *{access-token}*)
>                        , CURLOPT_RETURNTRANSFER => 1 // means output will 
> be a return value from curl_exec() instead of simply echoed
>                  ) );
>     // Execute, grab errors
>     $result = curl_exec($ch);
>     echo nl2br("\n\n\n");
>     if($result !== FALSE) {
>         echo $result;
>     }
>
> Result :
>
> {"version":"1.0","encoding":"UTF-8","entry":{"xmlns":"
> http://www.w3.org/2005/Atom","xmlns$media":"http://search.yahoo.com/mrss/
> ","media$group":{"media$content":[{"url":"
> https://lh3.googleusercontent.com/--u3dvEy-pfg/UOmTLYQyuKE/AAAAAAAAA2Q/PFJSHBup4k8nYFuQsFkFKYZCeTp-5VtSACHM/ProfilePhotos","type":"image/jpeg","medium":"image"}],"media$credit":[{"$t":"Murtaza
>  
> vhora"}],"media$description":{"$t":"","type":"plain"},"media$keywords":{},"media$thumbnail":[{"url":"
> https://lh3.googleusercontent.com/--u3dvEy-pfg/UOmTLYQyuKE/AAAAAAAAA2Q/PFJSHBup4k8nYFuQsFkFKYZCeTp-5VtSACHM/s160-c/ProfilePhotos","height":160,"width":160}],"media$title":{"$t":"Profile
>  
> Photos","type":"plain"}}}}
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-picasa-data-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-picasa-data-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-picasa-data-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to