Newer Version Available

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

SocialEngagement Class

Manage information about social accounts or fan pages for social networks.

Namespace

ConnectApi

SocialEngagement Methods

These methods are for SocialEngagement. All methods are static.

deleteSocialPost(socialPostId, socialAccountId)

Delete a social post from its social network.

Deleting a social post from its social network doesn’t delete the record from Salesforce.

Note

API Version

46.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.

followSocialPersona(socialPersonaId, socialAccountId)

Follow a social persona in its social network.

API Version

45.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.

followSocialPostPersona(socialPostId, socialAccountId)

Follow a social persona on a social post in its social network.

API Version

45.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.

getIntents(socialPostId)

Get available intents for a social post.

API Version

45.0

Requires Chatter

No

Signature

public static ConnectApi.SocialPostIntents getIntents(String socialPostId)

Parameters

socialPostId
Type: String
ID of a social post.

Return Value

Type: ConnectApi.SocialPostIntents

getManagedSocialAccount(id)

Get a managed social account that is in the org and assigned to the user.

API Version

44.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

Type: ConnectApi.ManagedSocialAccount

getManagedSocialAccounts()

Gets a list of managed social accounts that are in the org and assigned to the user.

API Version

44.0

Requires Chatter

No

Signature

public static ConnectApi.ManagedSocialAccounts getManagedSocialAccounts()

getManagedSocialAccounts(socialNetwork)

Get a list of managed social accounts that are in the org and assigned to the user.

API Version

44.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:
  • Facebook
  • GooglePlus
  • Instagram
  • InstagramBusiness
  • KakaoTalk
  • Kik
  • Line
  • LinkedIn
  • Messenger
  • Other
  • Pinterest
  • QQ
  • Rypple
  • SinaWeibo
  • SMS
  • Snapchat
  • Telegram
  • Twitter
  • VKontakte
  • WeChat
  • WhatsApp
  • YouTube

getRelationship(id, socialPersonaId)

Get the follow relationship between a managed social account and a social persona.

API Version

46.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.

hideSocialPost(socialPostId, socialAccountId)

Hide a social post in its social network.

API Version

46.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

Type: ConnectApi.HideSocialPostIntent

likeSocialPost(socialPostId, socialAccountId)

Like a social post in its social network.

API Version

46.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

Type: ConnectApi.LikeSocialPostIntent

massApprove(massApproval)

Approve or reject the publishing of a large number of social posts.

API Version

46.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.

recallApproval(socialPostId)

Recall an approval request to publish a social post.

API Version

46.0

Requires Chatter

No

Signature

public static Void recallApproval(String socialPostId)

Parameters

socialPostId
Type: String
ID of the social post.

Return Value

Type: Void

unfollowSocialPersona(socialPersonaId, socialAccountId)

Stop following a social persona in its social network.

API Version

45.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)

Stop following a social persona of a social post in its social network.

API Version

45.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)

Unhide a social post in its social network.

API Version

46.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)

Unlike a social post in its social network.

API Version

46.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