Social Sharing

Plugin contains the Cross-platform native platform sharing API implementation.

Advantages:

  • You do not need to create any social app on Facebook or Twitter website
  • You do not need to prompt user to authenticate with your app with requested permissions before you can use API
  • User will not leave your app for Twitter authentication.
  • Posting looks natively for a platform

Disadvantages

  • You can only prompt user to post messages / images to twitter.
  • You will not know or be able to respond if the users cancels their post from the native app.

If you are looking for OAuth Twitter or Facebook API, please have a look at Mobile Social Plugin

Posting to Twitter

UM_ShareUtility.TwitterShare("This is my text to share");
UM_ShareUtility.TwitterShare("This is my text to share", ImageToShare);

 

Result of this API calls would be similar to screenshot below:

Posting to Facebook

UM_ShareUtility.FacebookShare("This is my text to share");
UM_ShareUtility.FacebookShare("This is my text to share", ImageToShare);

 

Result of this API calls would be similar to the screenshot below:

Sharing Media

UM_ShareUtility.ShareMedia("This is my text to share");
UM_ShareUtility.ShareMedia("This is my text to share", ImageToShare);

 

Result of this API calls would be similar to the screenshot below:

skitch.pngskitch.png

Sending E-mail:

Send an e-mail API is a bit different because it gives us the possibility to add recipients.

UM_ShareUtility.SendMail( "My E-mail Subject", "This is my text to share", "mail1@gmail.com, mail2@gmail.com", textureForPost);

 

Note: You can also use HTML format for your e-mail. See the example bellow:

UM_ShareUtility.SendMail( "My E-mail Subject", "This is my text to share <br> <strong> html text </strong>", "mail1@gmail.com, mail2@gmail.com", textureForPost);