Time for action – adding limit and offset to GraphRequest instances
- To make it a little easier to use
limit
-offset
with our Requestors, let's add parameters for setting them toGraphRequest.as
:package graph { public class GraphRequest { public var objectID:String = ""; public var connectionID:String = ""; public var limit:int = 25; public var offset:int = 0; public function GraphRequest(a_objectID:String = "", a_connectionID:String = "") { this.objectID = a_objectID; this.connectionID = a_connectionID; } } }
- We can make the HTTPRequestor use these by editing the
request()
function inHTTPRequestor.as
:public function request(a_request:GraphRequest):void { var loader:URLLoader = new URLLoader(); var urlRequest:URLRequest = new URLRequest(); var ...
Get Facebook Graph API Development with Flash now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.