Time for action – using the POST method
- To specify that we want to use the
POST
method, we change themethod
property ofURLRequest
(after all,POST
is arequest
method). Another class,flash.net.URLRequestMethod
, containsconsts
with all the permitted values, so import it inHTTPRequestor.as
:import flash.net.URLRequestMethod;
- We set up the
URLLoader
,URLRequest
, andURLVariables
instances in the same way as we do in therequest()
andsearch()
methods:public function publish(a_publishObject:PublishObject):void { var loader:URLLoader = new URLLoader(); var urlRequest:URLRequest = new URLRequest(); var variables:URLVariables = new URLVariables(); }
- Because we want to post to our own Wall, we use our profile's
feed
connection as the URL—there's no ...
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.