Social-ANE is a native extension for sending messages to social networks on iOS. It uses the social functionality added in iOS6. The extension allows the application to send messages using Twitter, Facebook and sinaWeibo. It’s possible to individually test if a particular social network is supported.

A developer can programmatically set the message text, add URLs and images. At the end of the process, the developer can launch the iOS message view for the user to edit and send the message. The extension fires events after the message view was launched, allowing the application to monitor if the message was sent or not.


// Test if the extension is supported
if(Social.isSupported && Social.isAvailableForService(SocialService.twitter)) {
  var social : Social = new Social(SocialService.twitter);

  social.addEventListener( SocialEvent.CANCELLED, eventReceived);
  social.addEventListener( SocialEvent.COMPLETE, eventReceived);

  social.setMessage("A test message");
  var bmp :BitmapData = new BitmapData(200, 200);

private function eventReceived( event : SocialEvent ) : void {
  trace( "\n " + event.type);
Air Native Extension, iOS . URL.