Created on 20 February 2019
icon_unfollowing
Login to follow
social-sharing

Social Sharing

Stable version 1.0.5 (Compatible with OutSystems 11)
Uploaded on 30 May 2022 by 
social-sharing

Social Sharing

Documentation
1.0.4

Highlights

  • isAvailable : isAvailable(callback)
  • SocialSharing : It accepts an options object and callbacks. socialsharing(options, callback)
  • Options :
    • message - String // Not supported on some apps (Facebook, Instagram)
    • subject – String // For Email
    • files – [] // An array of filenames either locally or remotely (Dynamic And Customize)
    • url - String
    • chooserTitle - String // Android only, you can override the default share sheet title.
    • appPackageName - String // Android only, you can provide id of the App you want to share with
  • Callback : Return button index clicked.


Usage on iOS and Android

You can share text, a subject (in case the user selects the email application), (any type and location of) file (like an image), and a link. However, what exactly gets shared, depends on the application the user chooses to complete the action. A few examples:

  • Mail: message, subject, file.
  • Twitter: message, image (other filetypes are not supported), link (which is automatically shortened if the Twitter client deems it necessary).
  • Google+ / Hangouts (Android only): message, subject, link
  • facebook
  • Instagram
  • Whatsapp
  • SMS

If Facebook, Twitter, Instagram, WhatsApp, SMS or Email is not available, the errorCallback is called with the text 'not available'.

You can still use the older SHARE method as well

  • Twitter
  • Facebook
  • Instagram
  • Whatsapp
  • Mail
  • SMS


NOTE:

For Whatsapp

  • On iOS when sharing an image and text, only the image is shared.
  • On Android you can only send a 'text' and 'url' directly to someone, so files are ignored.

For SMS

  • On Android, SMS via Hangouts may not behave correctly.

For Twitter

  • A lot of apps support sharing multiple files, but Twitter just doesn't accept more that one file.

Support options
This asset is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from  who created this asset.
Dependencies
See all 1 dependencies