I need to change my AuthSub code to oAuth since Google is deprecating AuthSub. In my project currently a user can create and share his google docs to other with writer/read only role.
While changing authsub to oauth, I am able to create new docs with oauth code, but I am not able to share this docs to other user.
Here is my authsub code
<?php
$dataShare="<feed xmlns=\"w3.org/2005/Atom\" xmlns:gAcl='schemas.google.com/acl/2007'; xmlns:batch='schemas.google.com/gdata/batch'>; <category scheme='schemas.google.com/g/2005#kind'; term='schemas.google.com/acl/2007#accessRule'/>";;
$dataShare .= "<entry>
<batch:id>1</batch:id>
<batch:operation type='insert'/>
<gAcl:role value='writer' />
<gAcl:scope type='user' value='emailid@gmail.com'/> </entry>";
$dataShare .= "</feed>";
$uri = "docs.google.com/feeds/default/private/full/$newShareDocID/acl/batch";
$headers[]= "Host: docs.google.com";
$headers[]= "GData-Version: 3.0";
$headers[]= "Content-Type: application/atom+xml";
$headers[]= "Authorization: AuthSub token=\"".$_SESSION['docsSampleSessionToken']."\"";
$a = new cURL($headers);
$b = $a->post($uri, $dataShare);
?>
How do I change this sharing code according to oauth. I searched on net but couldn't find anything. Thanks in advance..