Android SDK Version
  • java.lang.Object
    • com.facebook.share.model.GameRequestContent.Builder
Enclosing class:

public static class GameRequestContent.Builder
extends java.lang.Object
implements ShareModelBuilder<GameRequestContent,GameRequestContent.Builder>
Builder class for a concrete instance of GameRequestContent
Constructor Summary
Constructor and Description
Builder() 
Method Summary
Modifier and TypeMethod and Description
GameRequestContentbuild()
Builds the object.
GameRequestContent.BuilderreadFrom(GameRequestContent content)
Reads the values from a ShareModel into the builder.
GameRequestContent.BuildersetActionType(GameRequestContent.ActionType actionType)
Sets the action type for this request
GameRequestContent.BuildersetData(java.lang.String data)
Sets optional data which can be used for tracking; maximum length is 255 characters.
GameRequestContent.BuildersetFilters(GameRequestContent.Filters filters)
Sets the filters for everybody/app users/non app users
GameRequestContent.BuildersetMessage(java.lang.String message)
Sets the message users receiving the request will see.
GameRequestContent.BuildersetObjectId(java.lang.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
GameRequestContent.BuildersetRecipients(java.util.List<java.lang.String> recipients)
An array of user IDs, usernames or invite tokens of people to send request.
GameRequestContent.BuildersetSuggestions(java.util.List<java.lang.String> suggestions)
Sets a list of user ids suggested as request receivers
GameRequestContent.BuildersetTitle(java.lang.String title)
Sets an optional title for the dialog; maximum length is 50 characters.
GameRequestContent.BuildersetTo(java.lang.String to)
Deprecated. 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

Builder

public Builder()
Method Detail

setMessage

public GameRequestContent.Builder setMessage(java.lang.String message)
Sets the message users receiving the request will see. The maximum length is 60 characters.
Parameters:
message - the message
Returns:
the builder

setTo

public GameRequestContent.Builder setTo(java.lang.String to)
Deprecated. Replaced by setRecipients(List)
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
Returns:
the builder

setRecipients

public GameRequestContent.Builder setRecipients(java.util.List<java.lang.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
Returns:
the builder

setData

public GameRequestContent.Builder setData(java.lang.String data)
Sets optional data which can be used for tracking; maximum length is 255 characters.
Parameters:
data - the data
Returns:
the builder

setTitle

public GameRequestContent.Builder setTitle(java.lang.String title)
Sets an optional title for the dialog; maximum length is 50 characters.
Parameters:
title - the title
Returns:
the builder

setActionType

public GameRequestContent.Builder setActionType(GameRequestContent.ActionType actionType)
Sets the action type for this request

setObjectId

public GameRequestContent.Builder setObjectId(java.lang.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

public GameRequestContent.Builder setFilters(GameRequestContent.Filters filters)
Sets the filters for everybody/app users/non app users

setSuggestions

public GameRequestContent.Builder setSuggestions(java.util.List<java.lang.String> suggestions)
Sets a list of user ids suggested as request receivers

build

public GameRequestContent build()
Description copied from interface: ShareBuilder
Builds the object.
Specified by:
Returns:
The built object.

readFrom

public GameRequestContent.Builder readFrom(GameRequestContent content)
Description copied from interface: ShareModelBuilder
Reads the values from a ShareModel into the builder.
Specified by:
Parameters:
content - The source ShareModel
Returns:
The builder.