【问题标题】:appcelerator titanium whatsapp share "The item connat be shared,please select a different item"appcelerator Titan whatsapp share "该项目已被共享,请选择其他项目"
【发布时间】:2016-04-20 12:34:23
【问题描述】:

有没有办法用 Titanium iOS 手机在 whatsapp 上分享文字? 我尝试了 dk.napp.social 模块,它对图像工作正常,但对于文本共享,它给了我一个错误“该项目已被共享,请选择其他项目”。

任何想法提前谢谢

【问题讨论】:

    标签: appcelerator appcelerator-titanium


    【解决方案1】:

    iOS 9 有安全性,在 tiapp.xml 中添加

    <key>LSApplicationQueriesSchemes</key>
    <array>
    <string>whatsapp</string>
    </array>
    

    并尝试:

    var whatsappMessage = String.format('whatsapp://send?text=%s', message);
    
    if(OS_IOS && Ti.Platform.canOpenURL(whatsappMessage)){
       Ti.Platform.openURL(whatsappMessage);
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-08-04
      • 2012-05-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-05
      • 1970-01-01
      相关资源
      最近更新 更多