I just did some research and found a way to retrieve the labels. Below
is the code you may add to the printFeed function. Remember, category
is an ARRAY and you need to improve the below code using FOR LOOP to
retrieve all the labels.
echo $entry->category[0]->getTerm();
Thanks,
Lokesh.
On Jul 26, 1:56 am, Jdvno <joaomus...@gmail.com> wrote:
> Hi, I'm new to php programming, claases and objects are concepts that
> I barely grasp if at all, yet I'm crazy enough to dive into the Gdata
> API. I need help, I'm getting the feeling that the Gdata api for
> blogger is very bad, at least for me.
>
> I'm having a major problem with labels, how do I add labels and
> retrieve labels from a post?
>
> function printFeed($feed)
> {
> $i = 0;
> foreach($feed->entries as $entry)
> {
> // echo "\t" . $i ." ". $entry->title->text . "\n";
> echo "". $entry->title->text ."".$entry->getCategory()."<br/>";
> $i++;
> }
> }
>
> The only thing this does, is print the word "Array" next to the blog
> post title, how do I loop torugh this array?
>
> Best Regards
> Jdvno
--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To post to this group, send email to bloggerdev@googlegroups.com.
To unsubscribe from this group, send email to bloggerdev+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bloggerdev?hl=en.
No comments:
Post a Comment