Thanks Sven

Dave L

On Monday, 15 August 2016 17:54:58 UTC+1, Sven Bluege wrote:
>
> Seems like I forgot about this :) Here is the content of the PHP file. 
>
> $new_access= filter_var($_POST['new_access'], FILTER_SANITIZE_STRING);
> if (!in_array($new_access,array('public','private','protected'))){
> die('permission not supported.');
> }
> $userid = filter_var($_POST['userid'], FILTER_SANITIZE_STRING);
> $albumid = filter_var($_POST['albumid'], FILTER_SANITIZE_STRING);
> $access_token = filter_var($_POST['access_token'], FILTER_SANITIZE_STRING);
> if (empty($access_token)){
> die();
> }
>
> $url = 'https://picasaweb.google.com/data/entry/api/user/' . $userid . 
> '/albumid/' . $albumid .'?alt=json';
>
> $xml="<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gphoto='
> http://schemas.google.com/photos/2007'>
>  <gphoto:access>".$new_access."</gphoto:access>
> </entry>";
>
> $url=$url."&".http_build_query(array('access_token'=>$access_token));
>
> $curl = curl_init($url);
> curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PATCH");
> curl_setopt($curl, CURLOPT_HEADER, false);
> curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
> curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: 
> application/xml',"GData-Version: 2","If-Match: *"));
> curl_setopt($curl, CURLOPT_POSTFIELDS, $xml);
> curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
> curl_setopt($curl, CURLOPT_VERBOSE, true);
>
> // Make the REST call, returning the result
> $response = curl_exec($curl);
>
> $resp=json_decode($response,true);
>
> echo json_encode(array("response"=>$resp)); 
>
> On Monday, August 15, 2016 at 5:19:51 PM UTC+2, David Longley wrote:
>>
>> Hi Sven
>>
>> Thanks for your reply.
>>
>> I found this at line 174 line in the code
>>
>> url = 'change_permission.php',
>>
>> I imagined that this was the code that talks to the data api
>>
>> Dave L
>>
>> On Sunday, 14 August 2016 07:38:03 UTC+1, Sven Bluege wrote:
>>>
>>> This is actually not necessary since there is no PHP code involved. It's 
>>> plain JS code.
>>>
>>> On Sat, Aug 13, 2016 at 7:26 PM, David Longley <dklo...@gmail.com> 
>>> wrote:
>>>
>>>> Hi Sven
>>>>
>>>> Could you share the PHP code for your picasa api tool on github or 
>>>> somewhere else so we could host on our server so as not to eat up your 
>>>> resources?
>>>>
>>>> Regards
>>>> Dave L
>>>>
>>>>
>>>> On Sunday, 12 June 2016 07:13:41 UTC+1, Sven Bluege wrote:
>>>>>
>>>>> I have a little tool which seems to still work: 
>>>>> https://www.svenbluege.de/picasa/v1.1/
>>>>> At least I was able to change the visibility of an album to 
>>>>> private/protected/public
>>>>>
>>>>> On Wednesday, May 25, 2016 at 7:47:26 PM UTC+2, rjhwebconsultin wrote:
>>>>>>
>>>>>>
>>>>>> So I was retrieving my album list using:
>>>>>>
>>>>>> new Ajax.JSONRequest('
>>>>>> http://picasaweb.google.com/data/feed/api/user/usename?kind=album&access=public&alt=json
>>>>>> ', {
>>>>>>   callbackParamName: "callback",
>>>>>>   parameters: {
>>>>>>   }, etc etc 
>>>>>>
>>>>>> this worked great in the PicasaWeb page where I could just set albums 
>>>>>> to public or not. Now in Photos I'm unable to change the status of the 
>>>>>> albums so that I can see them or not see them. 
>>>>>>
>>>>>> If this is the case I'm going to have to find a better service to 
>>>>>> host the photos on and link them into my site. Any ideas as to how to 
>>>>>> manage the "public" nature of these albums in Photos. 
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>> -- 
>>>> You received this message because you are subscribed to a topic in the 
>>>> Google Groups "Google Picasa Web Albums API" group.
>>>> To unsubscribe from this topic, visit 
>>>> https://groups.google.com/d/topic/google-picasa-data-api/d-TXJX0zf-4/unsubscribe
>>>> .
>>>> To unsubscribe from this group and all its topics, send an email to 
>>>> google-picasa-data-api+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to google-pica...@googlegroups.com.
>>>> Visit this group at 
>>>> https://groups.google.com/group/google-picasa-data-api.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-picasa-data-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-picasa-data-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-picasa-data-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to