# SocialService

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Tags: Not creatable, Not replicated, Service
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/SocialService/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/SocialService

Facilitates social functions that impact relationships made on the Roblox platform.

## Methods

### CanSendCallInviteAsync

```luau
SocialService:CanSendCallInviteAsync(player: Instance): boolean
```

- Tags: Yields, Capabilities: Social

Indicates whether the given [`Player`](https://rapi.sleaze.dev/classes/Player.md) can invite other players to a call.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) instance of the player potentially sending a call invite.

Returns: Whether the specified player can send a call invite.

### CanSendGameInviteAsync

```luau
SocialService:CanSendGameInviteAsync(player: Instance, recipientId: User? = U1.AQAAAAAAAAAAAAAAAAAAAAA): boolean
```

- Tags: Yields, Capabilities: Social

Indicates whether the given [`Player`](https://rapi.sleaze.dev/classes/Player.md) can invite other players.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) instance of the player potentially sending an invite.
- `recipientId`: Optional [`Player.UserId`](https://rapi.sleaze.dev/classes/Player.md) of the potential **recipient**, used to check whether the sender can invite that specific recipient.

Returns: Whether the specified player can send an invite.

### GetEventRsvpStatusAsync

```luau
SocialService:GetEventRsvpStatusAsync(eventId: string): Enum.RsvpStatus
```

- Tags: Yields, Capabilities: Social

Returns the local player's RSVP status for the given event.

Parameters:

- `eventId`: The event ID of the event to prompt the player to change their RSVP status for. This must be a valid event ID that exists in the current experience, represented as a string (not a number).

Returns: Returns an `RsvpStatus` indicating the player's current RSVP status for the event. If the player has not RSVP'd to the event, this will return `RsvpStatus.None`.

### GetExperienceEventAsync

```luau
SocialService:GetExperienceEventAsync(eventId: string): { [string]: any }?
```

- Tags: Yields, Capabilities: Social

Returns details for the specified experience event or `nil` if it is unavailable.

Parameters:

- `eventId`: The string identifier of the event to retrieve. Must correspond to an event in the current experience.

Returns: A dictionary describing the event, or `nil` if the event does not exist, belongs to another experience, or is otherwise unavailable.

### GetPartyAsync

```luau
SocialService:GetPartyAsync(partyId: string): { any }
```

- Tags: Yields, Capabilities: Social

Returns an array of dictionaries containing data for all members of the specified party who are currently in the experience.

Parameters:

- `partyId`: The unique identifier of the party to retrieve member data for, corresponding to a [`Player.PartyId`](https://rapi.sleaze.dev/classes/Player.md) value.

Returns: An array of dictionaries representing the members of the specified party who are currently in the experience.

### GetPlayersByPartyId

```luau
SocialService:GetPlayersByPartyId(partyId: string): { Instance }
```

- Tags: Capabilities: Social

Returns a table of all presently connected [`Player`](https://rapi.sleaze.dev/classes/Player.md) objects whose [`Player.PartyId`](https://rapi.sleaze.dev/classes/Player.md) property matches the passed `partyId`.

Parameters:

- `partyId`: The unique identifier of the party to filter players by, corresponding to a [`Player.PartyId`](https://rapi.sleaze.dev/classes/Player.md) value.

Returns: A table of [`Player`](https://rapi.sleaze.dev/classes/Player.md) objects whose [`Player.PartyId`](https://rapi.sleaze.dev/classes/Player.md) property matches the passed `partyId`.

### GetUpcomingExperienceEventsAsync

```luau
SocialService:GetUpcomingExperienceEventsAsync(): { any }
```

- Tags: Yields, Capabilities: Social

Returns active and upcoming experience events for the current experience.

Returns: An array of dictionaries describing each active or upcoming event in the current experience, ordered by soonest start time first.

### HideSelfView

```luau
SocialService:HideSelfView()
```

- Tags: Capabilities: Social

Hides the calling player's self view.

### InvokeGameInvitePromptClosed

```luau
SocialService:InvokeGameInvitePromptClosed(player: Instance, recipientIds: { any })
```

- Tags: Roblox script security, Capabilities: Social

### InvokeIrisInvite

```luau
SocialService:InvokeIrisInvite(player: Instance, tag: string, irisParticipants: { any })
```

- Tags: Roblox script security, Capabilities: Social

### InvokeIrisInvitePromptClosed

```luau
SocialService:InvokeIrisInvitePromptClosed(player: Instance)
```

- Tags: Roblox script security, Capabilities: Social

### InvokeShareSheetClosed

```luau
SocialService:InvokeShareSheetClosed()
```

- Tags: Roblox script security, Capabilities: Social

### PromptFeedbackSubmissionAsync

```luau
SocialService:PromptFeedbackSubmissionAsync(options: { [string]: any }?)
```

- Tags: Yields, Capabilities: Social

Prompts the player to submit feedback or a player support ticket about the current experience.

Parameters:

- `options`: Optional [`Dictionary`](https://rapi.sleaze.dev/index/types/Dictionary.md) configuring the prompt. Supported keys: - `FeedbackType` (`FeedbackType`). Selects which feedback flow to display. Defaults to `FeedbackType.Feedback`.

### PromptGameInvite

```luau
SocialService:PromptGameInvite(player: Instance, experienceInviteOptions: Instance? = nil)
```

- Tags: Capabilities: Social

Prompts the given [`Player`](https://rapi.sleaze.dev/classes/Player.md) with the invite screen.

Parameters:

- `player`: The [`Player`](https://rapi.sleaze.dev/classes/Player.md) to prompt with the invite popup.
- `experienceInviteOptions`: Optional [`ExperienceInviteOptions`](https://rapi.sleaze.dev/classes/ExperienceInviteOptions.md) object for customizing the prompt.

### PromptLinkSharingAsync

```luau
SocialService:PromptLinkSharingAsync(player: Player, options: { [string]: any }? = nil): ...any
```

- Tags: Yields, Capabilities: Social

Generates an expiring share link and prompts the given [`Player`](https://rapi.sleaze.dev/classes/Player.md) with the platform share sheet.

Parameters:

- `player`: Prompts the given [`Player`](https://rapi.sleaze.dev/classes/Player.md) with a Roblox platform-level share sheet with a generated share link.
- `options`: [`Dictionary`](https://rapi.sleaze.dev/index/types/Dictionary.md) that specifies the configuration for the generated link. It includes the following optional key-value pairs:

- `FallbackLinkId` (string). Determines how this share link will direct player to once expired. Default to experience join link.
- `ExpirationSeconds` (number). Determines time to expiration once the share link is created. Truncates to nearest integer. Defaults to 86,400.
- `PreviewTitle` (string) Preview title of the share link.
- `PreviewDescription` (string) Preview description of the share link.
- `PreviewAssetId` (number) Image asset ID used for share link preview.
- `LaunchData` (string). Used to set a parameter in [`Player:GetJoinData()`](https://rapi.sleaze.dev/classes/Player.md) when a player joined using the generated share link.

Returns: A tuple containing an `PromptLinkSharingResult` indicating the result of the link sharing prompt.

### PromptPhoneBook

```luau
SocialService:PromptPhoneBook(player: Instance, tag: string)
```

- Tags: Capabilities: Social

Prompts the given [`Player`](https://rapi.sleaze.dev/classes/Player.md) with the phone book.

Parameters:

- `player`: The player to prompt with the phone book.
- `tag`: String to help differentiate between various phone book "entry points" or similar. For example, you can pass a string defining what region of an experience the calling player's character is currently in.

### PromptRsvpToEventAsync

```luau
SocialService:PromptRsvpToEventAsync(eventId: string): Enum.RsvpStatus
```

- Tags: Yields, Capabilities: Social

Prompts the local [`Player`](https://rapi.sleaze.dev/classes/Player.md) with a prompt to change their RSVP status to the given event.

Parameters:

- `eventId`: The event ID of the event to prompt the player to change their RSVP status for. This must be a valid event ID that exists in the current experience, represented as a string (not a number).

Returns: Returns a `RsvpStatus` indicating the player's new RSVP status after the prompt is closed. If the player closes the prompt without changing their RSVP status, this will return `RsvpStatus.None` or their old `RsvpStatus` if they had already selected a status.

### PromptRsvpToEventCompleted

```luau
SocialService:PromptRsvpToEventCompleted(eventId: string, success: boolean, rsvpStatus: Enum.RsvpStatus, previousRsvpStatus: Enum.RsvpStatus? = Enum.RsvpStatus.None)
```

- Tags: Roblox script security, Capabilities: Social

### ShowSelfView

```luau
SocialService:ShowSelfView(selfViewPosition: Enum.SelfViewPosition? = Enum.SelfViewPosition.LastPosition)
```

- Tags: Capabilities: Social

Shows the calling player's self view.

Parameters:

- `selfViewPosition`: The position to place the self view .

### SignalFeedbackSubmissionCompleted

```luau
SocialService:SignalFeedbackSubmissionCompleted(feedback: string, options: { [string]: any }?)
```

- Tags: Roblox script security, Capabilities: Social

### SignalFeedbackSubmissionPermissionDenied

```luau
SocialService:SignalFeedbackSubmissionPermissionDenied()
```

- Tags: Roblox script security, Capabilities: Social

### UpdatePlayerPartyData

```luau
SocialService:UpdatePlayerPartyData(partyId: string)
```

- Tags: Roblox script security, Capabilities: Social

### PromptLinkSharing

```luau
SocialService:PromptLinkSharing(player: Player, options: { [string]: any }? = nil): ...any
```

- Tags: Deprecated, Yields, Capabilities: Social
- Use instead: [`SocialService.PromptLinkSharingAsync`](https://rapi.sleaze.dev/classes/SocialService.md)

**Deprecated:** Use [`PromptLinkSharingAsync()`](https://rapi.sleaze.dev/classes/SocialService.md) instead.

Parameters:

- `player`: Prompts the given [`Player`](https://rapi.sleaze.dev/classes/Player.md) with a Roblox platform-level share sheet with a generated share link.
- `options`: [`Dictionary`](https://rapi.sleaze.dev/index/types/Dictionary.md) that specifies the configuration for the generated link. It includes the following optional key-value pairs:

- `FallbackLinkId` (string). Determines how this share link will direct player to once expired. Default to experience join link.
- `ExpirationSeconds` (number). Determines time to expiration once the share link is created. Truncates to nearest integer. Defaults to 86,400.
- `PreviewTitle` (string) Preview title of the share link.
- `PreviewDescription` (string) Preview description of the share link.
- `PreviewAssetId` (number) Image asset ID used for share link preview.
- `LaunchData` (string). Used to set a parameter in [`Player:GetJoinData()`](https://rapi.sleaze.dev/classes/Player.md) when a player joined using the generated share link.

Returns: A tuple containing an `PromptLinkSharingResult` indicating the result of the link sharing prompt.

## Events

### CallInviteStateChanged

```luau
SocialService.CallInviteStateChanged: RBXScriptSignal<(player: Instance, inviteState: Enum.InviteState)>
```

- Tags: Capabilities: Social

Fires when a player's call invite state changes.

### GameInvitePromptClosed

```luau
SocialService.GameInvitePromptClosed: RBXScriptSignal<(player: Instance, recipientIds: { any })>
```

- Tags: Capabilities: Social

Fires when a player closes an invite prompt.

### IrisInviteInitiated

```luau
SocialService.IrisInviteInitiated: RBXScriptSignal<(message: string)>
```

- Tags: Hidden, Roblox engine security, Capabilities: Social

### OpenShareSheetWithLink

```luau
SocialService.OpenShareSheetWithLink: RBXScriptSignal<(link: string)>
```

- Tags: Roblox script security, Capabilities: Social

### PhoneBookPromptClosed

```luau
SocialService.PhoneBookPromptClosed: RBXScriptSignal<(player: Instance)>
```

- Tags: Capabilities: Social

Fires when a player closes the phone book prompt.

### PlayerPartyDataChanged

```luau
SocialService.PlayerPartyDataChanged: RBXScriptSignal<(partyId: string)>
```

- Tags: Roblox script security, Capabilities: Social

### PromptInviteRequested

```luau
SocialService.PromptInviteRequested: RBXScriptSignal<(player: Instance, experienceInviteOptions: Instance)>
```

- Tags: Roblox script security, Capabilities: Social

### PromptIrisInviteRequested

```luau
SocialService.PromptIrisInviteRequested: RBXScriptSignal<(player: Instance, tag: string)>
```

- Tags: Roblox script security, Capabilities: Social

### SelfViewHidden

```luau
SocialService.SelfViewHidden: RBXScriptSignal<()>
```

- Tags: Roblox script security, Capabilities: Social

### SelfViewVisible

```luau
SocialService.SelfViewVisible: RBXScriptSignal<(selfViewPosition: Enum.SelfViewPosition)>
```

- Tags: Roblox script security, Capabilities: Social

### ShareSheetClosed

```luau
SocialService.ShareSheetClosed: RBXScriptSignal<(player: Player)>
```

- Tags: Capabilities: Social

Fires when the player closes the share sheet opened by [`PromptLinkSharingAsync()`](https://rapi.sleaze.dev/classes/SocialService.md).

### ShowPromptFeedbackSubmission

```luau
SocialService.ShowPromptFeedbackSubmission: RBXScriptSignal<(feedbackType: Enum.FeedbackType)>
```

- Tags: Roblox script security, Capabilities: Social

### ShowPromptFeedbackUnavailable

```luau
SocialService.ShowPromptFeedbackUnavailable: RBXScriptSignal<(reason: string, feedbackType: Enum.FeedbackType)>
```

- Tags: Roblox script security, Capabilities: Social

### ShowPromptRsvpToEvent

```luau
SocialService.ShowPromptRsvpToEvent: RBXScriptSignal<(eventId: string)>
```

- Tags: Roblox script security, Capabilities: Social

## Callbacks

### OnCallInviteInvoked

```luau
SocialService.OnCallInviteInvoked: (tag: string, callParticipantIds: { any }) -> Instance
```

- Tags: Capabilities: Social

Callback for when a call is placed from the phone book.

Parameters:

- `tag`: String to help differentiate between various phone book entry points.
- `callParticipantIds`: Array containing all of the players involved in the call. The caller will always be the first player in the array.

Returns: Table including the `PlaceId` and `ReservedServerAccessCode` keys whose values are the [`DataModel.PlaceId`](https://rapi.sleaze.dev/classes/DataModel.md) and the server access code returned by [`TeleportService:ReserveServerAsync()`](https://rapi.sleaze.dev/classes/TeleportService.md), respectively.

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
