<script>
function GetLikeCountFromService(strURL) {
var count = 0;
//change the webMethod var to match up to the correct sharepoint _vti_bin location. (https://msdn.microsoft.com/en-us/library/office/Bb862916(v=office.12).aspx)
var webMethod = \'/_vti_bin/SocialDataService.asmx?op=GetTagTermsOnUrl\';
var soapEnv = "<soap:Envelope xmlns:xsi=\'http://www.w3.org/2001/XMLSchema-instance\' xmlns:xsd=\'http://www.w3.org/2001/XMLSchema\' xmlns:soap=\'http://schemas.xmlsoap.org/soap/envelope/\'> <soap:Body><GetTagTermsOnUrl xmlns=\'http://microsoft.com/webservices/SharePointPortalServer/SocialDataService\'> <url>" + strURL + "</url> <maximumItemsToReturn>1</maximumItemsToReturn> </GetTagTermsOnUrl> </soap:Body> </soap:Envelope>";
$.ajax({
type: "POST",
async: true,
url: webMethod,
data: soapEnv,
contentType: "text/xml; charset=utf-8",
dataType: "xml",
success: function(data, textStatus, XMLHttpRequest) {
count  = $(\'SocialTermDetail\', data).find(\'Count\').text();
}
});
return count;
}
</script>