SocialDataService.CountTagsOfUser method

Gets the total number of all social tags created by the specified user.

Namespace:  WebSvcSocialDataService
Assembly:  UserProfileServices (in UserProfileServices.dll)

Syntax

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

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

Parameters

  • userAccountName
    Type: System.String

    The account name of the user to be counted.

Return value

Type: System.Int32
The total number of all social tags created by the specified user.

Exceptions

Exception Condition
ArgumentNullException

userAccountName is null .

UserNotFoundException

The user profile for userAccountName cannot be found.

SqlException

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

Remarks

If an error occurs or no social tags are found, this method returns 0.

If the account name of the current user is equal to the value of userAccountName or the current user is an administrator, the total includes both private and public social tags; otherwise the count only includes public social tags.

See also

Reference

SocialDataService class

SocialDataService members

WebSvcSocialDataService namespace