Package | com.distriqt.extension.facebook.graphapi.builders |
Class | public class GraphRequestBuilder |
Inheritance | GraphRequestBuilder Object |
This class is a helper class to construct GraphRequest
instances.
Method | Defined By | ||
---|---|---|---|
Constructor
| GraphRequestBuilder | ||
addField(field:String):GraphRequestBuilder
Add a field to be requested with the graph request
| GraphRequestBuilder | ||
addFields(fields:Array):GraphRequestBuilder
Add an array of fields to the request. | GraphRequestBuilder | ||
addParameter(name:String, value:Object):GraphRequestBuilder
Add a parameter to the request
| GraphRequestBuilder | ||
Builds the request object
| GraphRequestBuilder | ||
[static] | GraphRequestBuilder | ||
[static] | GraphRequestBuilder | ||
[static] | GraphRequestBuilder | ||
[static] | GraphRequestBuilder | ||
postImageToDefaultAlbumRequest(image:BitmapData, message:String):GraphRequest [static] | GraphRequestBuilder | ||
postLinkToWallRequest(linkUrl:String, caption:String, message:String, description:String):GraphRequest [static] | GraphRequestBuilder | ||
postStatusUpdateRequest(message:String):GraphRequest [static] | GraphRequestBuilder | ||
setCompleteCallback(callback:Function):GraphRequestBuilder
Sets the callback function for successful completion of this request. | GraphRequestBuilder | ||
setErrorCallback(callback:Function):GraphRequestBuilder
Sets the callback for an error on this request
| GraphRequestBuilder | ||
setImage(image:BitmapData):GraphRequestBuilder
Add custom image data to be sent with a graph request. | GraphRequestBuilder | ||
setMethod(method:String):GraphRequestBuilder
Sets the HTTP method to use for this request
| GraphRequestBuilder | ||
setPath(apiPath:String):GraphRequestBuilder
The graph API endpoint for the request
| GraphRequestBuilder |
Constant | Defined By | ||
---|---|---|---|
METHOD_DELETE : String = DELETE [static] | GraphRequestBuilder | ||
METHOD_GET : String = GET [static] | GraphRequestBuilder | ||
METHOD_POST : String = POST [static] | GraphRequestBuilder |
GraphRequestBuilder | () | Constructor |
public function GraphRequestBuilder()
Constructor
addField | () | method |
public function addField(field:String):GraphRequestBuilder
Add a field to be requested with the graph request
Parameters
field:String — String name of the field to be added to the request
|
GraphRequestBuilder — GraphRequestBuilder instance for chaining calls
|
addFields | () | method |
public function addFields(fields:Array):GraphRequestBuilder
Add an array of fields to the request. This must be an array of String values each representing a different field to add to the request.
Parameters
fields:Array — Must be an Array of String fields
|
GraphRequestBuilder — GraphRequestBuilder instance for chaining calls
|
new GraphRequestBuilder() .setPath( "/me" ) .addFields( [ "email", "name" ] ) .build();
addParameter | () | method |
public function addParameter(name:String, value:Object):GraphRequestBuilder
Add a parameter to the request
Parameters
name:String — String name of the parameter
| |
value:Object — The value of the parameter
|
GraphRequestBuilder — GraphRequestBuilder instance for chaining calls
|
build | () | method |
public function build():GraphRequest
Builds the request object
ReturnsGraphRequest — A valid GraphRequest instance for making a Graph API request
|
getCurrentPermissionsRequest | () | method |
getCurrentUserInfoRequest | () | method |
getUserFriendsRequest | () | method |
getUserFriendsWithInstalledRequest | () | method |
postImageToDefaultAlbumRequest | () | method |
public static function postImageToDefaultAlbumRequest(image:BitmapData, message:String):GraphRequest
Parameters
image:BitmapData | |
message:String |
GraphRequest |
postLinkToWallRequest | () | method |
public static function postLinkToWallRequest(linkUrl:String, caption:String, message:String, description:String):GraphRequest
Parameters
linkUrl:String | |
caption:String | |
message:String | |
description:String |
GraphRequest |
postStatusUpdateRequest | () | method |
public static function postStatusUpdateRequest(message:String):GraphRequest
Parameters
message:String |
GraphRequest |
setCompleteCallback | () | method |
public function setCompleteCallback(callback:Function):GraphRequestBuilder
Sets the callback function for successful completion of this request.
Parameters
callback:Function — A function that takes an Object parameter.
This will be the same as the GraphRequestEvent.COMPLETE event data property.
|
GraphRequestBuilder — GraphRequestBuilder instance for chaining calls
|
setErrorCallback | () | method |
public function setErrorCallback(callback:Function):GraphRequestBuilder
Sets the callback for an error on this request
Parameters
callback:Function — A function that takes a int and String parameters representing the error code and message.
|
GraphRequestBuilder — GraphRequestBuilder instance for chaining calls
|
setImage | () | method |
public function setImage(image:BitmapData):GraphRequestBuilder
Add custom image data to be sent with a graph request. Most commonly used for uploading photos, etc.
Parameters
image:BitmapData — BitmapData representation of the image to be attached
|
GraphRequestBuilder — GraphRequestBuilder instance for chaining calls
|
setMethod | () | method |
public function setMethod(method:String):GraphRequestBuilder
Sets the HTTP method to use for this request
Parameters
method:String — The HTTP method, may be "GET", "DELETE" or "POST"
|
GraphRequestBuilder — GraphRequestBuilder instance for chaining calls
|
setPath | () | method |
public function setPath(apiPath:String):GraphRequestBuilder
The graph API endpoint for the request
Parameters
apiPath:String — The graph API endpoint for the request
|
GraphRequestBuilder — GraphRequestBuilder instance for chaining calls
|
METHOD_DELETE | Constant |
public static const METHOD_DELETE:String = DELETE
METHOD_GET | Constant |
public static const METHOD_GET:String = GET
METHOD_POST | Constant |
public static const METHOD_POST:String = POST
var request:GraphRequest = new GraphRequestBuilder() .setPath( "/me" ) .addField( "email" ) .addField( "name" ) .build();