Skydrive API更改文件夹的权限?

时间:2012-07-28 13:42:34

标签: c# windows-phone-7 onedrive

我正在尝试更改skydrive上文件夹的访问权限,但它无效。

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

我做错了什么?

2 个答案:

答案 0 :(得分:0)

请记住,您需要激活 wl.skydrive_update 范围才能更新与SkyDrive实体相关的数据。此外,权限是只读的(详细信息here)。

答案 1 :(得分:0)

权限是只读的。 像这样,读取文件夹的权限。

...
    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();
        }
    {