Skip to content

Commit 4ca84d3

Browse files
update Open Source Docs from Roblox internal teams
1 parent d99b693 commit 4ca84d3

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

content/en-us/reference/engine/classes/SocialService.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -339,25 +339,25 @@ methods:
339339
local HttpService = game:GetService("HttpService")
340340
local SocialService = game:GetService("SocialService")
341341
342-
local pcallSuccess, result = pcall(function()
343-
local data = {
344-
senderUserID = player.UserId,
345-
spawnLocation = {12, 48, 205.5}
346-
}
347-
local launchData = HttpService:JSONEncode(data)
342+
local success, result = pcall(function()
343+
local data = {
344+
promoCode = "j7du67"
345+
}
348346
349-
local LinkSharingOptions = {
350-
ExpirationSeconds = 20000,
351-
PreviewTitle = "Awesome Game",
352-
PreviewDescription = " Lets play together",
353-
PreviewAssetId = 15303457470,
354-
LaunchData= "rewards=50coins,roomId=20"
355-
}
356-
return SocialService:PromptLinkSharing(player, LinkSharingOptions)
347+
local launchData = HttpService:JSONEncode(data)
348+
349+
local LinkSharingOptions = {
350+
ExpirationSeconds = 20000,
351+
PreviewTitle = "Awesome Game",
352+
PreviewDescription = "Lets play together",
353+
LaunchData = launchData,
354+
}
355+
356+
return SocialService:PromptLinkSharing(player, LinkSharingOptions)
357357
end)
358358
359-
if not pcallSuccess or result ~= Enum.PromptLinkSharingResult.Success then
360-
warn(`PromptLinkSharing failed:`, tostring(result))
359+
if not success or result ~= Enum.PromptLinkSharingResult.Success then
360+
warn("PromptLinkSharing failed:", tostring(result))
361361
end
362362
```
363363
code_samples: []

0 commit comments

Comments
 (0)