2010-09-13 58 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电话。