Revision [539]
Last edited on 2007-06-05 19:37:53 by KlenwellAdminAdditions:
A live demo can be found [[http://klenwell.net/greqo/ here]].
// Request Authorization Token (redundant: request_blog_list method calls this)
$_HTML['stdout'] .= '
if ( $GreqoBlogger->request_clientlogin_token($service='blogger', $force=1) )
$_HTML['stdout'] .= '
#$_HTML['stdout'] .= '
$_HTML['stdout'] .= '
if ( $_DATA['BLOG_LIST'] = $GreqoBlogger->request_blog_list() )
$_HTML['stdout'] .= '
$list_array = print_r($_DATA['BLOG_LIST'], 1);
$_HTML['result'] .= "
$_CSS['result_height'] = "height:240px;";
$_HTML['stdout'] .= '
// 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:
// 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 KlenwellAdminAdditions:
echo $_HTML['result'];
Revision [221]
Edited on 2007-02-21 15:01:17 by KlenwellAdminAdditions:
=====Greqo Demo: get blogger user blog list=====
Revision [219]
Edited on 2007-02-21 14:55:48 by KlenwellAdminAdditions:
The example below obtains a ""ClientLogin"" authorization token and then uses it to request the list of blogs affiliated with the current user.
----
CategoryGreqo
----
CategoryGreqo
Deletions:
Revision [218]
Edited on 2007-02-21 14:55:00 by KlenwellAdminAdditions:
====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.
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.