new InviteUsersRequest(invitedUsers, secondsForAnswer[, params])

Creates a new InviteUsersRequest instance. The instance must be passed to the SmartFox.send() method for the request to be executed.

This request sends a generic invitation to a list of users. Invitations can be used for different purposes, such as requesting users to join a game or visit a specific Room, asking the permission to add them as buddies, etc. Invited users receive the invitation as an invitation event dispatched to their clients: they can accept or refuse it by means of the InvitationReplyRequest request, which must be sent within the specified amount of time.

Parameters

Name Type Optional Description

invitedUsers

Array of SFSUser

 

A list of SFSUser objects, each representing a user to send the invitation to.

secondsForAnswer

number

 

The number of seconds available to each invited user to reply to the invitation (recommended range: 15 to 40 seconds).

params

SFSObject

Yes

An SFSObject containing custom parameters containing additional invitation details.

Defaults to null.

See also
SmartFox#send
InvitationReplyRequest
SFSEvent.INVITATION
SFSEvent.INVITATION_REPLY