-
- All Implemented Interfaces:
-
com.facebook.share.ShareBuilder,com.facebook.share.model.ShareModelBuilder
public class GameRequestContent.Builder implements ShareModelBuilder<GameRequestContent, GameRequestContent.Builder>
Builder class for a concrete instance of GameRequestContent
-
-
Field Summary
Fields Modifier and Type Field Description private Stringmessageprivate Stringctaprivate List<String>recipientsprivate Stringdataprivate Stringtitleprivate GameRequestContent.ActionTypeactionTypeprivate StringobjectIdprivate GameRequestContent.Filtersfiltersprivate List<String>suggestions
-
Method Summary
Modifier and Type Method Description GameRequestContent.BuildersetMessage(String message)Sets the message users receiving the request will see. GameRequestContent.BuildersetCta(String cta)Sets the cta users receiving the request will see. GameRequestContent.BuildersetRecipients(List<String> recipients)An array of user IDs, usernames or invite tokens of people to send request. GameRequestContent.BuildersetData(String data)Sets optional data which can be used for tracking; maximum length is 255 characters. GameRequestContent.BuildersetTitle(String title)Sets an optional title for the dialog; maximum length is 50 characters. GameRequestContent.BuildersetActionType(GameRequestContent.ActionType actionType)Sets the action type for this request GameRequestContent.BuildersetObjectId(String objectId)Sets the open graph id of the object that action type will be performed on Only valid (andrequired) for ActionTypes SEND, ASKFOR GameRequestContent.BuildersetFilters(GameRequestContent.Filters filters)Sets the filters for everybody/app users/non app users GameRequestContent.BuildersetSuggestions(List<String> suggestions)Sets a list of user ids suggested as request receivers GameRequestContent.BuildersetTo(String to)Sets the user ID or user name the request will be sent to. GameRequestContentbuild()GameRequestContent.BuilderreadFrom(GameRequestContent content)-
-
Method Detail
-
setMessage
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
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
-
setRecipients
GameRequestContent.Builder setRecipients(List<String> recipients)
An array of user IDs, usernames or invite tokens of people to send request. If this is notspecified, 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
GameRequestContent.Builder setData(String data)
Sets optional data which can be used for tracking; maximum length is 255 characters.
- Parameters:
data- the data
-
setTitle
GameRequestContent.Builder setTitle(String title)
Sets an optional title for the dialog; maximum length is 50 characters.
- Parameters:
title- the title
-
setActionType
GameRequestContent.Builder setActionType(GameRequestContent.ActionType actionType)
Sets the action type for this request
-
setObjectId
GameRequestContent.Builder setObjectId(String objectId)
Sets the open graph id of the object that action type will be performed on Only valid (andrequired) for ActionTypes SEND, ASKFOR
-
setFilters
GameRequestContent.Builder setFilters(GameRequestContent.Filters filters)
Sets the filters for everybody/app users/non app users
-
setSuggestions
GameRequestContent.Builder setSuggestions(List<String> suggestions)
Sets a list of user ids suggested as request receivers
-
setTo
GameRequestContent.Builder setTo(String to)
Sets the user ID or user name the request will be sent to. If this is not specified, a friendselector will be displayed and the user can select up to 50 friends.
- Parameters:
to- the id or user name to send the request to
-
build
GameRequestContent build()
-
readFrom
GameRequestContent.Builder readFrom(GameRequestContent content)
-
-
-
-