=====Greqo Demo: get blogger user blog list===== ====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 live demo can be found [[http://klenwell.net/greqo/ here]]. See [[GreqoDocLoadLibrary this page]] for information on including the Greqo code library in your script. ====Sample Code==== %%(php) 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']. '
'; $_FLAG['request_list'] = 1; } else { $_HTML['stdout'] .= 'unable to retrieve authentication token (devs have been notified)
'; } // Request List if ( $_FLAG['request_list'] ) { 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;";
}
else
{
$_HTML['stdout'] .= 'request failed (devs have been notified)
'; } } ?> %% ---- CategoryGreqo