Revision [540]

Last edited on 2007-06-05 19:39:54 by KlenwellAdmin
Additions:
The example below obtains a ""ClientLogin"" authorization token and then uses it to request the list of blogs affiliated with the current user.
A live demo can be found [[http://klenwell.net/greqo/ here]].
$_HTML['stdout'] .= '<p>attempting to retrieve blog feed</p>';
// Get Feed
if ( $_DATA['XML_ARRAY'] = $GreqoBlogger->request_feed($GreqoBlogger->blog_id, $num_entries=15, $start=1, $type='full') )
$_HTML['stdout'] .= '<p class="success">feed retrieved (see below)</p>';
$feed_array = print_r($_DATA['XML_ARRAY'], 1);
$_HTML['result'] .= "<pre>{$feed_array}</pre>";
$_CSS['result_height'] = "height:240px;";
$_HTML['stdout'] .= '<p class="failure">request failed (devs have been notified)</p>';
Deletions:
The example below obtains a ""ClientLogin"" authorization token and then uses it to request the list of entries for a blogger blog.
A complete demo script is available in the [[http://greqo.googlecode.com/svn/trunk/test/get_blog_list.php test directory]] packaged with Greqo on its Google code site.
// Reset request flag
$_FLAG['request_list'] = 0;
// Request Authorization Token
if ( greqo_request_clientlogin_token($GREQO['BLOGGER']['user'], $GREQO['BLOGGER']['password'], 'blogger', 1) )
if ( 0 ) echo $_SESSION['GDATA']['auth_token']; // debug: set to 1 to output auth_token
$_FLAG['request_list'] = 1;
trigger_error('unable to retrieve authentication token -- maybe a problem with Google servers or API changed again?', E_USER_WARNING);
// Request List
if ( $_FLAG['request_list'] )
if ( $_DATA['BLOG_LIST'] = greqo_blogger_get_blog_list() )
{
$list_array = print_r($_DATA['BLOG_LIST'], 1);
$_HTML['result'] .= "<pre>{$list_array}</pre>";
}
else
{
trigger_error('request failed -- maybe a problem with Google servers or API changed again?', E_USER_WARNING);
}
echo $_HTML['result'];


Revision [222]

The oldest known version of this page was created on 2007-02-21 15:06:34 by KlenwellAdmin
Valid XHTML 1.0 TransitionalValid CSSWikkaWiki