SocialEngagement Class
Manage information about social accounts or fan pages for social networks.
Social Studio was retired on November 18, 2024.
See Also
These methods are for SocialEngagement. All methods are static.
-
deleteSocialPost(socialPostId, socialAccountId)
Delete a social post from its social network.
-
followSocialPersona(socialPersonaId, socialAccountId)
Follow a social persona in its social network.
-
followSocialPostPersona(socialPostId, socialAccountId)
Follow a social persona on a social post in its social network.
-
Get available intents for a social post.
-
Get a managed social account that is in the org and assigned to the user.
-
Gets a list of managed social accounts that are in the org and assigned to the user.
-
getManagedSocialAccounts(socialNetwork)
Get a list of managed social accounts that are in the org and assigned to the user.
-
getRelationship(id, socialPersonaId)
Get the follow relationship between a managed social account and a social persona.
-
hideSocialPost(socialPostId, socialAccountId)
Hide a social post in its social network.
-
likeSocialPost(socialPostId, socialAccountId)
Like a social post in its social network.
-
Approve or reject the publishing of a large number of social posts.
-
Recall an approval request to publish a social post.
-
unfollowSocialPersona(socialPersonaId, socialAccountId)
Stop following a social persona in its social network.
-
unfollowSocialPostPersona(socialPostId, socialAccountId)
Stop following a social persona of a social post in its social network.
-
unhideSocialPost(socialPostId, socialAccountId)
Unhide a social post in its social network.
-
unlikeSocialPost(socialPostId, socialAccountId)
Unlike a social post in its social network.
Delete a social post from its social network.
Deleting a social post from its social network doesn’t delete the record from Salesforce.
46.0–61.0
No
public static ConnectApi.DeleteSocialPostIntent deleteSocialPost(String socialPostId, String socialAccountId)
- socialPostId
Type: String
ID of the social post to delete.
- socialAccountId
Type: String
ID of the social account that deletes the post.
Type: ConnectApi.DeleteSocialPostIntent
Follow a social persona in its social network.
45.0–61.0
No
public static ConnectApi.FollowSocialPersonaIntent followSocialPersona(String socialPersonaId, String socialAccountId)
- socialPersonaId
Type: String
ID of the social persona to follow.
- socialAccountId
Type: String
ID of the social account that follows the social persona.
Type: ConnectApi.FollowSocialPersonaIntent
Follow a social persona on a social post in its social network.
45.0–61.0
No
public static ConnectApi.FollowSocialPersonaIntent followSocialPostPersona(String socialPostId, String socialAccountId)
- 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.
Type: ConnectApi.FollowSocialPersonaIntent
Get available intents for a social post.
45.0–61.0
No
public static ConnectApi.SocialPostIntents getIntents(String socialPostId)
- socialPostId
Type: String
ID of a social post.
Type: ConnectApi.SocialPostIntents
Get a managed social account that is in the org and assigned to the user.
44.0–61.0
No
public static ConnectApi.ManagedSocialAccount getManagedSocialAccount(String id)
- id
Type: String
Description: Internal SFDC ID for this managed social account.
Type: ConnectApi.ManagedSocialAccount
Gets a list of managed social accounts that are in the org and assigned to the user.
44.0–61.0
No
public static ConnectApi.ManagedSocialAccounts getManagedSocialAccounts()
Type: ConnectApi.ManagedSocialAccounts
Get a list of managed social accounts that are in the org and assigned to the user.
44.0–61.0
No
public static ConnectApi.ManagedSocialAccounts getManagedSocialAccounts(ConnectApi.SocialNetworkProvider socialNetwork)
socialNetwork
Type: ConnectApi.SocialNetworkProvider
Description: Filters results based on the social network. Values are:
FacebookGooglePlusInstagramInstagramBusinessKakaoTalkKikLineLinkedInMessengerOtherPinterestQQRyppleSinaWeiboSMSSnapchatTelegramTwitterVKontakteWeChatWhatsAppYouTube
Type: ConnectApi.ManagedSocialAccounts
Get the follow relationship between a managed social account and a social persona.
46.0–61.0
No
public static ConnectApi.SocialAccountRelationship getRelationship(String id, String socialPersonaId)
- id
Type: String
ID of the managed social account.
- socialPersonaId
Type: String
ID of the social persona.
Type: ConnectApi.SocialAccountRelationship
Hide a social post in its social network.
46.0–61.0
No
public static ConnectApi.HideSocialPostIntent hideSocialPost(String socialPostId, String socialAccountId)
- socialPostId
Type: String
ID of the social post to hide.
- socialAccountId
Type: String
ID of the social account that hides the post.
Type: ConnectApi.HideSocialPostIntent
Like a social post in its social network.
46.0–61.0
No
public static ConnectApi.LikeSocialPostIntent likeSocialPost(String socialPostId, String socialAccountId)
- socialPostId
Type: String
ID of the social post to like.
- socialAccountId
Type: String
ID of the social account that likes the post.
Type: ConnectApi.LikeSocialPostIntent
Approve or reject the publishing of a large number of social posts.
46.0–61.0
No
public static ConnectApi.SocialPostMassApprovalOutput massApprove(ConnectApi.SocialPostMassApprovalInput massApproval)
- massApproval
Type:
ConnectApi.SocialPostMassApprovalInputA
ConnectApi.SocialPostMassApprovalInputbody that includes a list of social post IDs and the action to approve or reject publishing them.
Type: ConnectApi.SocialPostMassApprovalOutput
Recall an approval request to publish a social post.
46.0–61.0
No
public static Void recallApproval(String socialPostId)
- socialPostId
Type: String
ID of the social post.
Type: Void
Stop following a social persona in its social network.
45.0–61.0
No
public static Void unfollowSocialPersona(String socialPersonaId, String socialAccountId)
- 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.
Type: Void
Stop following a social persona of a social post in its social network.
45.0–61.0
No
public static Void unfollowSocialPostPersona(String socialPostId, String socialAccountId)
- 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.
Type: Void
Unhide a social post in its social network.
46.0–61.0
No
public static Void unhideSocialPost(String socialPostId, String socialAccountId)
- socialPostId
Type: String
ID of the social post to unhide.
- socialAccountId
Type: String
ID of the social account that unhides the post.
Type: Void
Unlike a social post in its social network.
46.0–61.0
No
public static Void unlikeSocialPost(String socialPostId, String socialAccountId)
- socialPostId
Type: String
ID of the social post to unlike.
- socialAccountId
Type: String
ID of the social account that unlikes the post.
Type: Void