【问题标题】:Sencha touch Share Button煎茶触摸分享按钮
【发布时间】:2014-04-21 09:47:11
【问题描述】:

我正在用 Sencha touch 构建一个画廊应用程序。几乎所有的工作都完成了。我计划为所有图像添加一个共享按钮。我在许多应用程序中都看到了这个功能。当他们单击图像时,它将列出手机中安装的所有网络应用程序(Whats App、Hike、Telegram 等)。通过选择Whats App,图像将发布到whats app。但我不确定如何实现此功能。 Sencha touch 有没有可用的分享插件。请提供一些指导以实现此功能。抱歉,我有很多代码要分享。

{
                xtype:'image',
                cls:'winreologosmall',
                listeners: {
                    tap: function() {
                        try {
                            // will open share option 
                        } catch (err) {
                            // catch error
                        }
                    }
                }

}

【问题讨论】:

    标签: cordova sencha-touch sencha-touch-2


    【解决方案1】:

    如果您使用cordova 进行打包(这种功能需要它),试试这个cordova 插件:

    https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin

    【讨论】:

    • 非常感谢您的帮助。我会检查插件并让你知道反馈。再次感谢。
    【解决方案2】:

    您可以轻松地为此使用第三方插件

    Social Networking Plugin

    您可以轻松使用上面的插件,比如一键分享whats app上的图片-

    <button onclick="window.plugins.socialsharing.shareViaWhatsApp('here path of your pic', null, null, console.log('share ok'), 
    function(errormsg){
         alert(errormsg)
    })">
    msg via WhatsApp (with errcallback)
    </button>
    

    参考上面的插件你会得到它的想法和例子。

    【讨论】:

    • @Suhas 非常感谢您的帮助
    猜你喜欢
    • 2011-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-25
    • 2012-11-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多