Newer Version Available

This content describes an older version of this product. View Latest

Chatter Class

Access information about followers and subscriptions for records.

Namespace

ConnectApi

Chatter Methods

The following are methods for Chatter. All methods are static.

deleteSubscription(String, String)

Deletes the specified subscription. Use this method to unfollow a record, a user, or a file.

API Version

28.0

Signature

public static void deleteSubscription(String communityId, String subscriptionId)

Parameters

communityId
Type: String
Use either the ID for a community, internal, or null.
subscriptionId
Type: String
The ID for a subscription.

Return Value

Type: void

Usage

To leave a group, call deleteMember(String, String).

getFollowers(String, String)

Returns the first page of followers for the specified record in the specified community. The page contains the default number of items.

API Version

28.0

Signature

public static ConnectApi.FollowerPage getFollowers(String communityId, String recordId)

Parameters

communityId
Type: String
Use either the ID for a community, internal, or null.
recordId
Type: String
The ID for a record or the keyword me.

getFollowers(String, String, Integer, Integer)

Returns the specified page of followers for the specified record.

API Version

28.0

Signature

public static ConnectApi.FollowerPage getFollowers(String communityId, String recordId, Integer pageParam, Integer pageSize)

Parameters

communityId
Type: String
Use either the ID for a community, internal, or null.
recordId
Type: String
The ID for a record or the keyword me.
pageParam
Type: Integer
Specifies the number of the page you want returned. Starts at 0. If you pass in null or 0, the first page is returned.
pageSize
Type: Integer
Specifies the number of items per page. Valid values are between 1 and 100. If you pass in null, the default size is 25.

getSubscription(String, String)

Returns information about the specified subscription.

API Version

28.0

Signature

public static ConnectApi.Subscription getSubscription(String communityId, String subscriptionId)

Parameters

communityId
Type: String
Use either the ID for a community, internal, or null.
subscriptionId
Type: String
The ID for a subscription.