[ENABLED as of May 28] SocialService Game Invites are Live

Withdrawn Thanks for Clarification Krunnie. Much Appreciated.

1 Like

He mentioned that recently. Just scroll up a little bit.

Edit: No problem, Goat! :slight_smile:

2 Likes

Following the launch of SocialService game invites, I’ve started getting “illegal teleport destination” errors. This wasn’t happening before and completely breaks our matchmaking system.

Perhaps it’s just a coincidence but it was working fine before and now it isn’t. Did something change with calling Teleport to Place Instance from the server?

2 Likes

I remember Pet Ranch Simulator just spammed us all with invitations. Apparently if you invite a few friends to that game, you get cool rewards, and the person that was invited got the rewards, too, but smaller IIRC.
So basically my friends were using me for rewards in a simulator. :wut:

BUT it was a cool way of advertising, in fact, it was one of the first major uses of SocialService Game Invites, and I don’t want to spread hate, by the way, I was just annoyed with it at the time. And now I think back to that moment today. :happy1:

1 Like

Can anyone verify if the person joining on the invite link has their friends FollowUserId because I’m starting to think it’s 0 because players are complaining that it doesn’t work.

1 Like

FollowUserId will only not be 0 if the game is launched from a join button flow (this can be done in Chat from a button labeld “Join” or the profile page “Join” button.) This feature does not create a Join button flow for invitations. This would be something we would like to support in the future.

This is likely a coincidence, teleport flows should not be affected by this change.

Unfortunately this is no longer possible with the latest changes made to GamePromptClosed, however you should be able to use FollowUserId if the user is joining from a Join button from the website. As mentioned earlier having invitation feature a Join button instead of a Play button is something we’d like to support in the future.

Thanks for the quick response. I’ll disable my invite system until FollowUserId is added to the Join button flow for invitations.

Will this be supported on gamepads at any time?

3 Likes

Looks cool although you should make it possible so developers can set the message although I understand that this could be abused.

2 Likes

Is it just me or does GameInvitePromptClosed not fire anything in the second argument?


image

I even took the implementation from the wiki and it still won’t work. I did notice a lot of core scripts giving out warnings, which look like this.

local SocialService = game:GetService("SocialService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer

local function canSendGameInvite(targetPlayer)
	local res, canSend = pcall(SocialService.CanSendGameInviteAsync, SocialService, targetPlayer)
	return res and canSend
end

local function promptGameInvite(targetPlayer)
	local res, canInvite = pcall(SocialService.PromptGameInvite, SocialService, targetPlayer)
	return res and canInvite
end

local function openGameInvitePrompt(targetPlayer)
	local canInvite = canSendGameInvite(targetPlayer)
	if canInvite then
		local promptOpened = promptGameInvite(targetPlayer)
		return promptOpened
	end
	return false
end

local function len(t)
	local l = 0
	for _ in pairs(t) do l = l + 1 end
	return l
end

local function invitePromptClosed(senderPlayer, recipientIds)
	print(len(recipientIds))
end

local function inputBegan(input, gameProcessed)
	local inputType = input.UserInputType
	local touch = Enum.UserInputType.Touch
	local mouse1 = Enum.UserInputType.MouseButton1

	if inputType == touch or inputType == mouse1 then
		openGameInvitePrompt(player)
	end
end

script.Parent.InputBegan:Connect(inputBegan)
SocialService.GameInvitePromptClosed:Connect(invitePromptClosed)
3 Likes

But that 4hrs cooldown seem so long and sad if they don’t join, your going to have to wait that 4hrs just to invite someone else.

if you read any of the previous posts by staff you would know that it doesn’t return anything anymore

will GameInvitePromptClosed return an empty table forever or are there plans to change it someday?

1 Like

Any more information now that it’s been 6 months?

No new information has been posted for this feature. If there’s something you’d like to know specifically, I’d recommend asking a more specific question. :slightly_smiling_face:

1 Like

We do not have immediate plans to re-enable this field.

Ideally we would instead provide a signal when someone has joined a game with the person who invited them, however this is currently not possible without some changes in our backend.

I also think this is a good idea. Could you do me a favor and make this it’s own thread for the feature request so it’s easier to track?

3 Likes

Is there any high-level idea of when this would happen? Could this be added to the roadmap?

Following up, I’ve created a feature request for this:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.