简体   繁体   中英

Skydrive API change permission of folder?

I'm trying to change the access permissions of a folder on skydrive, but it isn't working.

Dictionary<string, object> folderData = new Dictionary<string, object>();
folderData.Add("shared_with", "Everyone (public)");
LiveConnectClient client = new LiveConnectClient(session);
client.PutAsync(folderId, folderData);

What am I doing wrong?

Remember that you need to have the wl.skydrive_update scope active to update data related to SkyDrive entities. Also, the permissions are read-only (details here ).

the permissions are read-only. Like this, reading permission of folder.

...
    void Properties_Completed(object sender, LiveOperationCompletedEventArgs e)//completed
    {
        if (e.Error == null)
        {
            IDictionary<string,object> result = e.Result;
            object shr = result["shared_with"];
            IDictionary<string, object> permission = shr as IDictionary<string, object>;
            string access = permission["access"].ToString();
        }
    {

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM