-
- All Implemented Interfaces:
-
com.facebook.share.ShareBuilder
,com.facebook.share.model.ShareModelBuilder
public final class GameRequestContent.Builder implements ShareModelBuilder<GameRequestContent, GameRequestContent.Builder>
Builder class for a concrete instance of GameRequestContent
-
-
Constructor Summary
Constructors Constructor Description GameRequestContent.Builder()
-
Method Summary
Modifier and Type Method Description final GameRequestContent.Builder
setMessage(String message)
Sets the message users receiving the request will see. final GameRequestContent.Builder
setCta(String cta)
Sets the cta users receiving the request will see. final GameRequestContent.Builder
setTo(String to)
Sets the user ID or user name the request will be sent to. final GameRequestContent.Builder
setRecipients(List<String> recipients)
An array of user IDs, usernames or invite tokens of people to send request. final GameRequestContent.Builder
setData(String data)
Sets optional data which can be used for tracking; maximum length is 255 characters. final GameRequestContent.Builder
setTitle(String title)
Sets an optional title for the dialog; maximum length is 50 characters. final GameRequestContent.Builder
setActionType(GameRequestContent.ActionType actionType)
Sets the action type for this request final GameRequestContent.Builder
setObjectId(String objectId)
Sets the open graph id of the object that action type will be performed on Only valid (and required) for ActionTypes SEND, ASKFOR final GameRequestContent.Builder
setFilters(GameRequestContent.Filters filters)
Sets the filters for everybody/app users/non app users final GameRequestContent.Builder
setSuggestions(List<String> suggestions)
Sets a list of user ids suggested as request receivers GameRequestContent
build()
Builds the object. GameRequestContent.Builder
readFrom(GameRequestContent content)
Reads the values from a ShareModel into the builder. -
-
Method Detail
-
setMessage
final GameRequestContent.Builder setMessage(String message)
Sets the message users receiving the request will see. The maximum length is 60 characters.
- Parameters:
message
- the message
-
setCta
final GameRequestContent.Builder setCta(String cta)
Sets the cta users receiving the request will see. The maximum length is 10 characters.
- Parameters:
cta
- the cta for the message
-
setTo
@Deprecated(message = Replaced by {@link #setRecipients(List)}) final GameRequestContent.Builder setTo(String to)
Sets the user ID or user name the request will be sent to. If this is not specified, a friend selector will be displayed and the user can select up to 50 friends.
- Parameters:
to
- the id or user name to send the request to
-
setRecipients
final GameRequestContent.Builder setRecipients(List<String> recipients)
An array of user IDs, usernames or invite tokens of people to send request. If this is not specified, a friend selector will be displayed and the user can select up to 50 friends.
This is equivalent to the "to" parameter when using the web game request dialog.
- Parameters:
recipients
- the list of user ids to send the request to
-
setData
final GameRequestContent.Builder setData(String data)
Sets optional data which can be used for tracking; maximum length is 255 characters.
- Parameters:
data
- the data
-
setTitle
final GameRequestContent.Builder setTitle(String title)
Sets an optional title for the dialog; maximum length is 50 characters.
- Parameters:
title
- the title
-
setActionType
final GameRequestContent.Builder setActionType(GameRequestContent.ActionType actionType)
Sets the action type for this request
-
setObjectId
final GameRequestContent.Builder setObjectId(String objectId)
Sets the open graph id of the object that action type will be performed on Only valid (and required) for ActionTypes SEND, ASKFOR
-
setFilters
final GameRequestContent.Builder setFilters(GameRequestContent.Filters filters)
Sets the filters for everybody/app users/non app users
-
setSuggestions
final GameRequestContent.Builder setSuggestions(List<String> suggestions)
Sets a list of user ids suggested as request receivers
-
build
GameRequestContent build()
Builds the object.
-
readFrom
GameRequestContent.Builder readFrom(GameRequestContent content)
Reads the values from a ShareModel into the builder.
- Parameters:
content
- The source ShareModel
-
-
-
-