2012-07-28 223 views
1

我試圖更改skydrive上文件夾的訪問權限,但它不起作用。Skydrive API更改文件夾的權限?

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

我在做什麼錯?

回答

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

請記住,您需要激活wl.skydrive_update範圍以更新與SkyDrive實體相關的數據。此外,權限是隻讀的(詳細信息here)。

+0

好了,如何讀取文件夾的權限? – Oguzhan 2012-07-29 10:08:47

+0

閱讀我鏈接到的文檔。 – 2012-07-29 10:09:47