2010-09-13 62 views
2

在SharePoint當你點擊了「我喜歡」圖標,將其發送JSON這個URL添加社會標籤頁

「_vti_bin/socialdatainternalservice.json/AddQuickTag」

所以我寫了發送JSON數據的自定義腳本

$("a").click(function(){ 

     $.ajax({ 

     type: "POST", 
     url: "/_vti_bin/socialdatainternalservice.json/AddQuickTag", 
     data: '{"targetPage":"http://url/calendar.aspx","title":"Documents - All Documents","quickTagId":0}', 
     contentType: "application/json", 
     success: function(msg){ 
      alert(msg); 
     } 

     }); 

      return false; 
}); 

我收到一個錯誤,它只是表示「處理請求時出錯」。並且日誌文件中的錯誤顯示「請求格式無法識別URL意外以'/ AddQuickTag'結尾。」

是否可以編寫一個自定義腳本,它將JSON數據發佈到此URL並讓SharePoint標記一個頁面?

+0

你有沒有找到解決方案? – diceler 2012-08-24 12:29:57

回答

0

這些是對我喜歡的功能

/vti_bin/socialdatainternalservice.json/GetNormalizedPageUrl 

由郵政

{"pageUrl":"http://<web app name>/SitePages/Home.aspx"} 

返回

{"d":"http://<web app name>/"} 
/vti_bin/socialdatainternalservice.json/AddQuickTag 

{"targetPage":"http://<web app name>/","title":"Home - Home","quickTagId":0} 
來電

返回

{"d":null} 

我認爲你需要先做GetNormalized電話。