Swift SDK Version
- Represents a request to the Facebook Graph API.
GraphRequest
encapsulates the components of a request (the Graph API path, the parameters, error recovery behavior) and should be used in conjunction withGraphRequestConnection
to issue the request.Nearly all Graph APIs require an access token. Unless specified, theSee moreAccessToken.current
is used. Therefore, most requests will require login first (seeLoginManager
inFacebookLogin.framework
).Declaration
SwiftpublicstructGraphRequest:GraphRequestProtocol
- Protocol that represents a request to the Facebook Graph API.An implementation of this protocol is intended to be either generic and be used for a lot of separate endpoints, or encapsulate a request + response type for a single endpoint, for example
Profile
.To send a request and receive a response - seeGraphRequestConnection
.Nearly all Graph APIs require an access token. Unless specified, theAccessToken.current
is used. Therefore, most requests will require login first (seeLoginManager
inFacebookLogin.framework
).ASee morestart
function is provided for convenience for single requests.Declaration
SwiftpublicprotocolGraphRequestProtocol
- Represents HTTP methods that could be used to issueSee more
GraphRequestProtocol
.Declaration
SwiftpublicenumGraphRequestHTTPMethod:String
- Represents result of a single request. Can either beSee more
.success
or.failed
Declaration
SwiftpublicenumGraphRequestResult<T>whereT:GraphRequestProtocol
- Represents a generic response that was received whenSee more
GraphRequest
succeeded.Declaration
SwiftpublicstructGraphResponse:GraphResponseProtocol
- Protocol that represents a response for a givenSee more
GraphRequestProtocol
.Declaration
SwiftpublicprotocolGraphResponseProtocol
- Represents a single connection to Facebook to service a single or multiple requests.The request settings and properties are encapsulated in a reusableSee more
GraphRequest
or a customGraphRequestProtocol
. This object encapsulates the concerns of a single communication e.g. starting a connection, canceling a connection, or batching requests.Declaration
SwiftpublicclassGraphRequestConnection
- A container for data attachments so that additional metadata can be provided about the attachment (like content type or filename).See more
Declaration
SwiftpublicclassGraphRequestDataAttachment