Sharing Plugin

Sharing Plugin

  

Hi,

I wanted to ask if there is any tutorial to be able to use the social sharing plugin available in the forge. OR maybe some easy plugin tutorial.

I've been trying to integrate it in my app to send an email with a message defined but I am getting errors if i have an input parameter as text list.

Regards

The specific Email option is not implemented in the OS Wrapper.  Only Facebook and Twitter were specifically implemented for some reason.  You'd need to alter the plugin to programmatically send an email.  This is the Email section from the plugin...

window.plugins.socialsharing.shareViaEmail(
  'Message', // can contain HTML tags, but support on Android is rather limited:  http://stackoverflow.com/questions/15136480/how-to-send-html-content-with-image-through-android-default-email-client
  'Subject',
  ['to@person1.com', 'to@person2.com'], // TO: must be null or an array
  ['cc@person1.com'], // CC: must be null or an array
  null, // BCC: must be null or an array
  ['https://www.google.nl/images/srpr/logo4w.png','www/localimage.png'], // FILES: can be null, a string, or an array
  onSuccess, // called when sharing worked, but also when the user cancelled sharing via email. On iOS, the callbacks' boolean result parameter is true when sharing worked, false if cancelled. On Android, this parameter is always true so it can't be used). See section "Notes about the successCallback" below.
  onError // called when sh*t hits the fan
);