Events are an important way for you to engage your users, and keep them coming back to your experience. We’re introducing two new API calls that make it easy for you to automatically get event details, without having to hardcode event IDs. Previously, to prompt a player to RSVP to an event, you would use SocialService:PromptRsvpToEventAsync(). This required you to pass a specific eventId as an argument, and something you either had to hardcode or come up with a workaround to automate.
To solve this, and to make it easier to get information about any of your events for any other purpose, we’ve introduced two new methods to SocialService that lets you automatically find the upcoming events for an experience with a script.
GetUpcomingExperienceEventsAsync(): Fetches a list of all upcoming events scheduled for your experience. This will be returned as an array of dictionaries, ordered from soonest to latest.
GetExperienceEventAsync(): Fetches the details for a single, specific event by its ID. The details it returns includes the experience ID, title, description, and other information about the event.
We’ve updated the documentation for SocialService to include these new calls, which includes an example code snippet to help you get started to show how you might automate sending out event RSVP invites.
Let us know in the comments below if this was a helpful change, and we’d love your feedback on other improvements you’d like to see to SocialService or experience events!
This is great, and a super useful update! The only thing I’d request is for the image ID of the event thumbnail to be included in the returned dictionary, which would help with event UI automation.
My last event had over 1000 people signed up for it, but only got a total of… 32 plays from notifications
I’ve sent out notifications using the old Updates system and feel like I used to get way more impressions, it’s a bit unfortunate… maybe this update will help me get more people signed up.
Because it doesn’t takes in count if player is following the event, someone can just copy and paste inside of a loop and player can quit the game, because a invite prompt is showing looped
if selectedEvent then
if selectedEvent.UserRsvpStatus == Enum.RsvpStatus.NotGoing then
local success, result = pcall(function()
return SocialService:PromptRsvpToEventAsync(selectedEvent.Id)
end)
if not success then
warn("RSVP prompt failed:", result)
end
else
warn("Player is following the event")
end
else
warn("No future events available to prompt.")
return
end