Time for action – using the POST method

  1. To specify that we want to use the POST method, we change the method property of URLRequest (after all, POST is a request method). Another class, flash.net.URLRequestMethod, contains consts with all the permitted values, so import it in HTTPRequestor.as:
    import flash.net.URLRequestMethod;
  2. We set up the URLLoader, URLRequest, and URLVariables instances in the same way as we do in the request() and search() methods:
    public function publish(a_publishObject:PublishObject):void
    {
      var loader:URLLoader = new URLLoader();
      var urlRequest:URLRequest = new URLRequest();
      var variables:URLVariables = new URLVariables();
    }
  3. 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.