다음을 통해 공유


SocialDataService.CountCommentsOfUserOnUrl Method

Gets the count of all social comments created by the specified user for the specified URL.

Namespace:  [SocialDataService Web service]
Web service reference: http://Site/_vti_bin/SocialDataService.asmx

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://microsoft.com/webservices/SharePointPortalServer/SocialDataService/CountCommentsOfUserOnUrl", RequestNamespace := "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService",  _
    ResponseNamespace := "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function CountCommentsOfUserOnUrl ( _
    userAccountName As String, _
    url As String _
) As Integer
'Usage
Dim instance As SocialDataService
Dim userAccountName As String
Dim url As String
Dim returnValue As Integer

returnValue = instance.CountCommentsOfUserOnUrl(userAccountName, _
    url)
[SoapDocumentMethodAttribute("https://microsoft.com/webservices/SharePointPortalServer/SocialDataService/CountCommentsOfUserOnUrl", RequestNamespace = "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService", 
    ResponseNamespace = "https://microsoft.com/webservices/SharePointPortalServer/SocialDataService", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public int CountCommentsOfUserOnUrl(
    string userAccountName,
    string url
)

Parameters

  • userAccountName
    Type: System.String

    The account name of the specified user.

  • url
    Type: System.String

    The specified URL to be counted. This value must be in a valid URI format and must contain fewer than 2085 characters.

Return Value

Type: System.Int32
The count of all social comments created by the specified user for the specified URL.

Exceptions

Exception Condition
ArgumentNullException

userAccountName is null .

UserNotFoundException

The user profile for userAccountName cannot be found.

UriFormatException

The value of url is not in a valid format.

SqlException

The user does not have permission to access the user profile for userAccountName.

Remarks

If an error occurs or no social comment is found, this method returns 0

See Also

Reference

SocialDataService Class

SocialDataService Members

SocialDataService Web Service