Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
SocialEngagement Class
SocialEngagement Methods
deleteSocialPost(socialPostId, socialAccountId)
API Version
46.0–61.0
Requires Chatter
No
Signature
public static ConnectApi.DeleteSocialPostIntent deleteSocialPost(String socialPostId, String socialAccountId)
Parameters
- socialPostId
- Type: String
- ID of the social post to delete.
- socialAccountId
- Type: String
- ID of the social account that deletes the post.
Return Value
followSocialPersona(socialPersonaId, socialAccountId)
API Version
45.0–61.0
Requires Chatter
No
Signature
public static ConnectApi.FollowSocialPersonaIntent followSocialPersona(String socialPersonaId, String socialAccountId)
Parameters
- socialPersonaId
- Type: String
- ID of the social persona to follow.
- socialAccountId
- Type: String
- ID of the social account that follows the social persona.
Return Value
followSocialPostPersona(socialPostId, socialAccountId)
API Version
45.0–61.0
Requires Chatter
No
Signature
public static ConnectApi.FollowSocialPersonaIntent followSocialPostPersona(String socialPostId, String socialAccountId)
Parameters
- socialPostId
- Type: String
- ID of the social post authored by the social persona to follow.
- socialAccountId
- Type: String
- ID of the social account that follows the social persona.
Return Value
getIntents(socialPostId)
API Version
45.0–61.0
Requires Chatter
No
Signature
public static ConnectApi.SocialPostIntents getIntents(String socialPostId)
Parameters
- socialPostId
- Type: String
- ID of a social post.
Return Value
getManagedSocialAccount(id)
API Version
44.0–61.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedSocialAccount getManagedSocialAccount(String id)
Parameters
- id
- Type: String
- Description: Internal SFDC ID for this managed social account.
Return Value
getManagedSocialAccounts()
API Version
44.0–61.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedSocialAccounts getManagedSocialAccounts()
Return Value
getManagedSocialAccounts(socialNetwork)
API Version
44.0–61.0
Requires Chatter
No
Signature
public static ConnectApi.ManagedSocialAccounts getManagedSocialAccounts(ConnectApi.SocialNetworkProvider socialNetwork)
Parameters
socialNetwork
Type: ConnectApi.SocialNetworkProvider
Description: Filters results based on the social network. Values are:
- GooglePlus
- InstagramBusiness
- KakaoTalk
- Kik
- Line
- Messenger
- Other
- Rypple
- SinaWeibo
- SMS
- Snapchat
- Telegram
- VKontakte
- YouTube
Return Value
getRelationship(id, socialPersonaId)
API Version
46.0–61.0
Requires Chatter
No
Signature
public static ConnectApi.SocialAccountRelationship getRelationship(String id, String socialPersonaId)
Parameters
- id
- Type: String
- ID of the managed social account.
- socialPersonaId
- Type: String
- ID of the social persona.
Return Value
hideSocialPost(socialPostId, socialAccountId)
API Version
46.0–61.0
Requires Chatter
No
Signature
public static ConnectApi.HideSocialPostIntent hideSocialPost(String socialPostId, String socialAccountId)
Parameters
- socialPostId
- Type: String
- ID of the social post to hide.
- socialAccountId
- Type: String
- ID of the social account that hides the post.
Return Value
likeSocialPost(socialPostId, socialAccountId)
API Version
46.0–61.0
Requires Chatter
No
Signature
public static ConnectApi.LikeSocialPostIntent likeSocialPost(String socialPostId, String socialAccountId)
Parameters
- socialPostId
- Type: String
- ID of the social post to like.
- socialAccountId
- Type: String
- ID of the social account that likes the post.
Return Value
massApprove(massApproval)
API Version
46.0–61.0
Requires Chatter
No
Signature
public static ConnectApi.SocialPostMassApprovalOutput massApprove(ConnectApi.SocialPostMassApprovalInput massApproval)
Parameters
- massApproval
- Type: ConnectApi.SocialPostMassApprovalInput
- A ConnectApi.SocialPostMassApprovalInput body that includes a list of social post IDs and the action to approve or reject publishing them.
Return Value
unfollowSocialPersona(socialPersonaId, socialAccountId)
API Version
45.0–61.0
Requires Chatter
No
Signature
public static Void unfollowSocialPersona(String socialPersonaId, String socialAccountId)
Parameters
- socialPersonaId
- Type: String
- ID of the social persona to stop following.
- socialAccountId
- Type: String
- ID of the social account that stops following the social persona.
Return Value
Type: Void
unfollowSocialPostPersona(socialPostId, socialAccountId)
API Version
45.0–61.0
Requires Chatter
No
Signature
public static Void unfollowSocialPostPersona(String socialPostId, String socialAccountId)
Parameters
- socialPostId
- Type: String
- ID of the social post authored by the social persona to stop following.
- socialAccountId
- Type: String
- ID of the social account that stops following the social persona.
Return Value
Type: Void
unhideSocialPost(socialPostId, socialAccountId)
API Version
46.0–61.0
Requires Chatter
No
Signature
public static Void unhideSocialPost(String socialPostId, String socialAccountId)
Parameters
- socialPostId
- Type: String
- ID of the social post to unhide.
- socialAccountId
- Type: String
- ID of the social account that unhides the post.
Return Value
Type: Void
unlikeSocialPost(socialPostId, socialAccountId)
API Version
46.0–61.0
Requires Chatter
No
Signature
public static Void unlikeSocialPost(String socialPostId, String socialAccountId)
Parameters
- socialPostId
- Type: String
- ID of the social post to unlike.
- socialAccountId
- Type: String
- ID of the social account that unlikes the post.
Return Value
Type: Void