Ejemplo n.º 1
0
        public void OnSendEmail()
        {
            var ccRecipients  = new[] { "*****@*****.**" };
            var bccRecipients = new[] { "*****@*****.**", "*****@*****.**" };
            var recipients    = new[] { "*****@*****.**", "*****@*****.**" };

            IGShare.SendEmail(recipients, Subject, Message, ccRecipients, bccRecipients);
        }
Ejemplo n.º 2
0
        public void OnSendEmailEmbedded()
        {
            var ccRecipients  = new[] { "*****@*****.**" };
            var bccRecipients = new[] { "*****@*****.**", "*****@*****.**" };
            var recipients    = new[] { "*****@*****.**", "*****@*****.**" };

            IGShare.SendEmailViaController(recipients, ccRecipients, bccRecipients, Subject, Message,
                                           () => { Debug.Log("Success"); }, () => { Debug.Log("Cancelled"); },
                                           () => { Debug.Log("Failure"); }, () => { Debug.Log("Saved as draft"); }, Image);
        }
Ejemplo n.º 3
0
 public void OnPostToFacebook()
 {
     if (IGShare.IsFacebookSharingAvailable())
     {
         IGShare.PostToFacebook(
             () => Debug.Log("Posted to Facebook Successfully"),
             () => Debug.Log("Posting to Facebook Cancelled"), Message, Image);
     }
     else
     {
         Debug.Log("Native posting to Facebook is not available on this device. Apple disabled direct native sharing in Twitter and Facebook since iOS 11.");
     }
 }
Ejemplo n.º 4
0
 public void OnTweet()
 {
     if (IGShare.IsTwitterSharingAvailable())
     {
         IGShare.Tweet(
             () => Debug.Log("Tweeted Successfully"),
             () => Debug.Log("Tweeting Cancelled"), Message, Image);
     }
     else
     {
         Debug.Log("Native tweeting is not available on this device. Apple disabled direct native sharing in Twitter and Facebook since iOS 11.");
     }
 }
Ejemplo n.º 5
0
        public void OnShareTextWithImage()
        {
            var screenPosition = new Vector2(Screen.width / 2, Screen.height / 2);

            IGShare.Share(
                activityType =>
            {
                if (string.IsNullOrEmpty(activityType))
                {
                    Debug.Log("Posting was canceled or unknown result");
                }
                else
                {
                    Debug.Log("DONE sharing, activity: " + activityType);
                }
            },
                error => Debug.LogError("Error happened when sharing activity: " + error),
                Message, Image, screenPosition);
        }
Ejemplo n.º 6
0
        public void OnShareOnlyText()
        {
            var screenPosition = Vector2.zero;             // On iPads ONLY you can choose screen position of popover

            IGShare.Share(
                activityType =>
            {
                if (string.IsNullOrEmpty(activityType))
                {
                    Debug.Log("Posting was canceled or unknown result");
                }
                else
                {
                    Debug.Log("DONE sharing, activity: " + activityType);
                }
            },
                error => Debug.LogError("Error happened when sharing activity: " + error),
                Message, null, screenPosition);
        }
Ejemplo n.º 7
0
        public void OnShareTextWithLink()
        {
            var iosGoodiesAreGreat = "iOS Goodies are great!";
            var dmgLink            = "http://bit.ly/dmg-asset-store";
            var screenPosition     = new Vector2(Screen.width, Screen.height);          // On iPads ONLY you can choose screen position of popover

            IGShare.ShareTextWithLink(activityType =>
            {
                if (string.IsNullOrEmpty(activityType))
                {
                    Debug.Log("Posting was canceled or unknown result");
                }
                else
                {
                    Debug.Log("DONE sharing, activity: " + activityType);
                }
            },
                                      error => Debug.LogError("Error happened when sharing activity: " + error),
                                      iosGoodiesAreGreat, dmgLink, screenPosition);
        }
Ejemplo n.º 8
0
 public void OnSendSms()
 {
     IGShare.SendSmsViaDefaultApp("123456789", "My message!");
 }
Ejemplo n.º 9
0
 public void OnSendSmsEmbedded()
 {
     IGShare.SendSmsViaController("123456789", "Hello worksadk wa dwad !!!", () => Debug.Log("Success"),
                                  () => Debug.Log("Cancel"), () => Debug.Log("Failure"));
 }