Revision [539]

Last edited on 2007-06-05 19:37:53 by KlenwellAdmin
Additions:
A live demo can be found [[http://klenwell.net/greqo/ here]].
// Request Authorization Token (redundant: request_blog_list method calls this)
$_HTML['stdout'] .= '

attempting to retrieve gdata auth token

';
if ( $GreqoBlogger->request_clientlogin_token($service='blogger', $force=1) )
$_HTML['stdout'] .= '

token for user ' .$GreqoBlogger->email. ' retrieved

';
#$_HTML['stdout'] .= '

token: ' .$_SESSION['GDATA']['auth_token']. '

';
$_HTML['stdout'] .= '

unable to retrieve authentication token (devs have been notified)

';
if ( $_DATA['BLOG_LIST'] = $GreqoBlogger->request_blog_list() )
$_HTML['stdout'] .= '

blog list retrieved (see below)

';
$list_array = print_r($_DATA['BLOG_LIST'], 1);
$_HTML['result'] .= "
{$list_array}
";
$_CSS['result_height'] = "height:240px;";
$_HTML['stdout'] .= '

request failed (devs have been notified)

';
Deletions:
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.
// 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
trigger_error('unable to retrieve authentication token -- maybe a problem with Google servers or API changed again?', E_USER_WARNING);
if ( $_DATA['BLOG_LIST'] = greqo_blogger_get_blog_list() )
$list_array = print_r($_DATA['BLOG_LIST'], 1);
$_HTML['result'] .= "
{$list_array}
";
trigger_error('request failed -- maybe a problem with Google servers or API changed again?', E_USER_WARNING);
echo $_HTML['result'];


Revision [223]

Edited on 2007-02-21 15:07:19 by KlenwellAdmin
Additions:
echo $_HTML['result'];


Revision [221]

Edited on 2007-02-21 15:01:17 by KlenwellAdmin
Additions:
=====Greqo Demo: get blogger user blog list=====


Revision [219]

Edited on 2007-02-21 14:55:48 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.
----
CategoryGreqo
Deletions:
The example below obtains a ClientLogin authorization token and then uses it to request the list of blogs affiliated with the current user.


Revision [218]

Edited on 2007-02-21 14:55:00 by KlenwellAdmin
Additions:
====Overview====
The example below obtains a ClientLogin authorization token and then uses it to request the list of blogs affiliated with the current user.
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.
See [[GreqoDocLoadLibrary this page]] for information on including the Greqo code library in your script.


Revision [217]

The oldest known version of this page was created on 2007-02-21 14:50:45 by KlenwellAdmin
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki