0

I have code like this:

require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_Query');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');

$user = 'usser';
$pass = 'pass';
$service = 'blogger';

$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service, null,
        Zend_Gdata_ClientLogin::DEFAULT_SOURCE, null, null,
        Zend_Gdata_ClientLogin::CLIENTLOGIN_URI, 'GOOGLE');
$gdClient = new Zend_Gdata($client);

$blogID='someID';
$query = new Zend_Gdata_Query('http://www.blogger.com/feeds/' . $this->blogID . '/posts/default');

  $feed = $gdClient->getFeed($query);
  print $entry->title->text;

Problem is that i can print only few properties, like title and description. Any idea how to print other properties like id, url, author name, replies?

warriorslo
  • 23
  • 3

1 Answers1

2

I'm looking for the same solution. It turns out that all the properties are stored in the $ object-> property-> text

So if you want to get the message id, for example, you have to do this:

<?php
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_Query');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');

$user = 'usser';
$pass = 'pass';
$service = 'blogger';

$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service, null,
        Zend_Gdata_ClientLogin::DEFAULT_SOURCE, null, null,
        Zend_Gdata_ClientLogin::CLIENTLOGIN_URI, 'GOOGLE');
$gdClient = new Zend_Gdata($client);

$blogID='someID';
$query = new Zend_Gdata_Query('http://www.blogger.com/feeds/' . $this->blogID . '/posts/default');

  $feed = $gdClient->getFeed($query);
// for all array witch properties print object $feed;
//print_r($feed);
  foreach ($feed as $feeds => $f){
  $idText = explode('-', $f->id->text);
  $postID = $idText[2];
  $title = $ou->title->text;

  }
SimpleSpawn
  • 831
  • 1
  • 7
  • 18