Can you post the code please?

regards

/Erling

On Fri, Dec 12, 2008 at 7:44 PM, Jeff Fisher (Google) <
[email protected]> wrote:

>
> I'm not really sure what the problem was retrieving the tag feed. It
> works for my test account:
>
> http://picasaweb.google.com/data/feed/api/user/test.jfisher?kind=tag
>
> Cheers,
> -Jeff
>
>
> On Dec 11, 3:53 pm, ejepsen <[email protected]> wrote:
> > Sorry for the late reply... was on holiday :-D
> >
> > No the feed is not empty - I get an error unless I specify the AlbumID
> > AND the PhotoID - since my objective was to retrieve ALL tags for ALL
> > Photos in ALL Albums it still seems that I'd have iterate through
> > everything which just takes too much time.
> > My query url is:
> http://picasaweb.google.com/data/feed/api/user/default/albumid/527311...
> >
> > Account name is erling_A.T_wickedpixel_D.O.T_net / wickedpixelalbum
> >
> > Thanks /E
> >
> > On Dec 3, 1:44 am, Jeff Fisher <[email protected]> wrote:
> >
> > > So the feed is empty? Can you provide the URL you tried to retrieve
> > > manually? What is the account name?
> >
> > > Cheers,
> > > -Jeff
> >
> > > On Tue, Dec 2, 2008 at 1:48 PM, E Jepsen <[email protected]> wrote:
> > > > Hi,
> >
> > > > I tried that with the code below, I can retrieve the title of the
> account,
> > > > however no tags are displayed.
> >
> > > > I tried doing a "manual test" using the url given from getQueryUrl();
> -
> > > > that did not help either :-(
> >
> > > > function getAllTags($client, $user)
> > > > {
> > > >     $photos = new Zend_Gdata_Photos($client);
> >
> > > >     $query['user'] = new Zend_Gdata_Photos_UserQuery();
> > > >     $query['user']->setUser($user);
> > > >     $query['user']->setKind('tag');
> >
> > > >     $userFeed = $photos->getUserFeed(null, $query['user']);
> >
> > > >     foreach ($userFeed as $entry['photo']) {
> > > >         if ($entry['photo'] instanceof Zend_Gdata_Photos_TagEntry)
> > > > {
> >
> > > >             $tag = (string) $entry['photo']->getTitle().", <br>";
> > > >             $tag_arr[$tag]++;
> > > >         }
> > > >     }
> > > >     echo "<pre>".print_r($tag_arr,1)."</pre>";
> > > > }
> >
> > > > On Tue, Dec 2, 2008 at 8:35 PM, Jeff Fisher (Google) <
> > > > [email protected]> wrote:
> >
> > > >> Hi,
> >
> > > >> You should be able to do this by retrieving the "tag" kind from a
> user
> > > >> feed:
> >
> > > >>http://picasaweb.google.com/data/feed/api/user/default/?kind=tag
> >
> > > >> (Either authenticate that request or replace 'default' with your
> > > >> username.)
> >
> > > >> You can also accomplish this by using setKind() on a UserQuery
> object.
> >
> > > >> Cheers,
> > > >> -Jeff
> >
> > > >> On Dec 2, 1:35 am, ejepsen <[email protected]> wrote:
> > > >> > Hello,
> >
> > > >> > I would like to create a "tag-cloud" with the top 40 most used
> tags
> > > >> > for my 1700 photos. So far the only way I have found to do this is
> to
> > > >> > traverse all tags in all photos in all albums.... using foreach
> loops
> > > >> > - this adds up to quite a lengthy affair... is there a better way
> to
> > > >> > do this?
> > > >> > If this is the only way then I'll probably need to cache the
> result -
> > > >> > is there any good methods out there other than just throwing it
> into
> > > >> > mysql?
> >
> > > >> > I've posted function below.
> >
> > > >> > function getAllTags($client, $user)
> > > >> > {
> > > >> >     $photos = new Zend_Gdata_Photos($client);
> >
> > > >> >     $query['user'] = new Zend_Gdata_Photos_UserQuery();
> > > >> >     $query['user']->setUser($user);
> >
> > > >> >     $userFeed = $photos->getUserFeed(null, $query['user']);
> >
> > > >> >     echo "<h2>User Feed for: " . $userFeed->getTitle() . "</h2>";
> >
> > > >> >     foreach ($userFeed as $entry['user']) {
> > > >> >         if ($entry['user'] instanceof
> Zend_Gdata_Photos_AlbumEntry) {
> >
> > > >> >             $albumId = $entry['user']->getGphotoId();
> >
> > > >> >             $query['album'] = new Zend_Gdata_Photos_AlbumQuery();
> > > >> >             $query['album']->setUser($user);
> > > >> >             $query['album']->setAlbumId($albumId);
> >
> > > >> >             $albumFeed = $photos->getAlbumFeed($query['album']);
> >
> > > >> >             foreach ($albumFeed as $entry['album']) {
> > > >> >                 if ($entry['album'] instanceof
> > > >> > Zend_Gdata_Photos_PhotoEntry) {
> > > >> >                     $photoId = $entry['album']->getGphotoId();
> >
> > > >> >                     $query['photo'] = new
> Zend_Gdata_Photos_PhotoQuery
> > > >> > ();
> > > >> >                     $query['photo']->setUser($user);
> > > >> >                     $query['photo']->setAlbumId($albumId);
> > > >> >                     $query['photo']->setPhotoId($photoId);
> > > >> >                     $query['photo']->setKind('tag');
> >
> > > >> >                     $photoFeed = $photos->getPhotoFeed($query
> > > >> > ['photo']);
> >
> > > >> >                     foreach ($photoFeed as $entry['photo']) {
> > > >> >                         if ($entry['photo'] instanceof
> > > >> > Zend_Gdata_Photos_TagEntry) {
> >
> > > >> >                             $tag = (string)
> $entry['photo']->getTitle
> > > >> > ().", <br>";
> > > >> >                             $tag_arr[$tag]++;
> > > >> >                         }
> > > >> >                     }
> > > >> >                 }
> > > >> >             }
> > > >> >         }
> > > >> >     }
> > > >> >     echo "<pre>".print_r($tag_arr,1)."</pre>";
> >
> > > >> > }
> >
> > > > --
> >
> > > > MVH / Kind Regards
> >
> > > > Erling
> >
> > > > ----------------------
> >
> > > > (W): wickedpixel.net
> > > > (M): +45 20 6789 25
> > > > (E): [email protected]
> >
>


-- 

MVH / Kind Regards


Erling

----------------------

(W): wickedpixel.net
(M): +45 20 6789 25
(E): [email protected]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to