向页面添加社交标签 [英] Adding a social tag to a page
问题描述
在 SharePoint 中,当您单击我喜欢"图标时,它会将 json 发送到此 URL
In SharePoint when you click on the "I Like It" icon, it sends json to this URL
"_vti_bin/socialdatainternalservice.json/AddQuickTag"
"_vti_bin/socialdatainternalservice.json/AddQuickTag"
所以我写了一个自定义脚本来发送 JSON 数据
So I wrote a custom script which sends JSON data
$("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;
});
我收到一条错误消息,它只是说处理请求时出错".并且日志文件中的错误显示无法识别以 '/AddQuickTag' 结尾的 URL 的请求格式."
I get an error which simply says "There was an error processing the request." and the error in the log file says "Request format is unrecognized for URL unexpectedly ending in '/AddQuickTag'."
是否可以编写一个自定义脚本,将 JSON 数据发布到此 URL 并让 SharePoint 标记页面?
Is it possible to write a custom script which will post JSON data to this URL and have SharePoint tag a page?
推荐答案
这些是为 I Like it 功能进行的调用
These are the calls that are made for the I Like it functionality
/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.
I think you need to do the GetNormalized call first.
这篇关于向页面添加社交标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!