Hi ,
I have been trying for last few hours to use my multisession token
exchanged over singleuse token to query my feeds based of [g:id], but
unfortunately it fails in second attemp , In first attempt it works
just fine . i retrive the gid and then update the related item with
the prepared Atom XML .
for some reasom i need to update only a seleted set of item of my
feeds , so i have get g:id before i proceed , but a loop thru funtion
call to below
function getItems_gid($sessionToken,$search_keyword) {
global $developerKey, $itemsFeedURL;
echo "<br> Session token values =".$sessionToken;
$ch = curl_init(); /* Create a CURL handle. */
$SRC_FEEDURL = $itemsFeedURL . "?bq=".$search_keyword;
curl_setopt($ch, CURLOPT_URL, $SRC_FEEDURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type:
application/atom+xml', 'Authorization: AuthSub token="' .
trim($sessionToken) . '"', 'X-Google-Key: key=' . $developerKey ));
$result = curl_exec($ch); /* Execute the HTTP command. */
curl_close($ch);
//--custom function to get the id Url for this item
$id = extract_between("<entry>","</entry>",$result);
$id = trim($id);
$gid = extract_between("<id>","</id>",$id);
return $gid;
}
I have used the PHP 4.0 reciepe example as i donot have php5.x
version .
Strange part is that the session token is used more than once , once
to retirve the [g:id] and next to update the item , But when the same
sessionToken is used to retrieve the [g:id] for next item (bq=".
$search_keyword;) I get nothing . :( Please Please Group help