Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Cordova - Social Sharing Plugin

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.42k
    Comment on it

    Hi All,

    In this post we will discuss about Cordova social sharing plugin. Now adding social media in your app become easy with this plugin.You can share text, images or a Url via this plugin.

    About this plugin:

    • This plugin use native sharing window of your device.
    • It supports Android, iOS, Windows platform.
    • It works on Android 2.3 or higher version, iOS 6 or higher and window 8.

    Installation:

    First, we have to install the plugin in our Cordova project through CLI:

    $ cordova plugin add cordova-plugin-x-socialsharing


    After installation, we can use this functionality in our application. What we can share on social media application is depends on the application we use.

    For example:

    Mail: Through mail application we can share only message, subject and file.

    Twitter: On twitter messages, images and Url can be share.

    Google+/Hangout: These are Android applications. So we can share message, subject, link in our Android application only.

    Flickr: Only message and image we can share.

    Facebook: Sharing on Facebook from Android application is different from iOS application.

    In case of Android application: We can share either a link or a image. We cannot share both at a time. Sharing of message is not possible on Facebook i.e we cannot share any prefilled data on Facebook.

    In case of iOS application: We can share image and link. Earlier we could share message on Facebook but after an update on Fb now as android we can't share prefilled message on Facebook.

    We can share contents as given example:

    <button onclick="window.plugins.socialsharing.share('Welcome!')">Share</button>

    For more information visit: SocialSharing-PhoneGap-Plugin

    Hope it will help you :)

     

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: