views:

29

answers:

1

In SharePoint when you click on the "I Like It" icon, it sends json to this URL

"_vti_bin/socialdatainternalservice.json/AddQuickTag"

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; 
});

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'."

Is it possible to write a custom script which will post JSON data to this URL and have SharePoint tag a page?

A: 

These are the calls that are made for the I Like it functionality /vti_bin/socialdatainternalservice.json/GetNormalizedPageUrl Post {"pageUrl":"http:///SitePages/Home.aspx"} Returned {"d":"http:///"} /vti_bin/socialdatainternalservice.json/AddQuickTag Post {"targetPage":"http:///","title":"Home - Home","quickTagId":0} Returned {"d":null} I think you need to do the GetNormalized call first.

related questions