守望者--AIR技术交流

标题: Instagram 分享ANE(iOS & Android) [打印本页]

作者: 破晓    时间: 2015-1-28 15:45
标题: Instagram 分享ANE(iOS & Android)
Instagram-ANE

Based on Sharkhack Instagram's ANEs. We wanted to have a default implementation for iOS & Android into the same ANE.


  1. var instagram:Instagram = new Instagram();

  2. if (instagram.isInstalled())
  3.     instagram.share(new DaVikingCodeLogo().bitmapData, "my caption test");
复制代码
On Android we use directly the bitmapData whereas on iOS we turn it into a ByteArray. You may use a third argument for the compressor. Default is new JPEGEncoderOptions();Also on Android be sure to add this permission (the picture need to be saved on disk):
  1. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
复制代码



[attach]708[/attach]

相关链接:
https://github.com/DaVikingCode/Instagram-ANE






欢迎光临 守望者--AIR技术交流 (http://www.airmyth.com/)