Example #1
0
        private void ShareTextMessageOnSocialNetwork()
        {
            // Create share sheet
            SocialShareSheet _shareSheet = new SocialShareSheet();

            _shareSheet.Text = m_shareMessage;

            // Show composer
            NPBinding.UI.SetPopoverPointAtLastTouchPosition();
            NPBinding.Sharing.ShowView(_shareSheet, FinishedSharing);
        }
Example #2
0
    public void Tweet()
    {
        SocialShareSheet _shareSheet = new SocialShareSheet();

        _shareSheet.Text = "I've unlocked " + OverallController.instance.maxLevel + " levels on HiveMind, can you beat that?";

        _shareSheet.URL = "https://itunes.apple.com/us/app/hivemind-free-space-puzzle/id1109489072?ls=1&mt=8";
#if UNITY_ANDROID
        _shareSheet.URL = "https://play.google.com/store/apps/details?id=com.rebeccaansems.hivemind";
#endif

        NPBinding.UI.SetPopoverPointAtLastTouchPosition(); // To show popover at last touch point on iOS. On Android, its ignored.
        NPBinding.Sharing.ShowView(_shareSheet, FinishedSharing);
    }
Example #3
0
    public void ShareTwitter()
    {
        SocialShare = new SocialShareSheet();
#if UNITY_IOS
        SocialShare.URL = "https://itunes.apple.com/us/app/dont-drop-the-egg/id1435852144?ls=1&mt=8";
#elif UNITY_ANDROID
        SocialShare.URL = "https://play.google.com/store/apps/details?id=com.rebeccaansems.dontdroptheegg";
#endif
        SocialShare.Text = "My highscore on Don't Drop the Egg is " + GameData.l_HighScores[0].Second + " can you beat it? " + SocialShare.URL;

        // Show composer
        NPBinding.UI.SetPopoverPointAtLastTouchPosition(); // To show popover at last touch point on iOS. On Android, its ignored.
        NPBinding.Sharing.ShowView(SocialShare, FinishedSharing);
    }
    public void Tweet()
    {
        SocialShareSheet _shareSheet = new SocialShareSheet();

        _shareSheet.Text = "I just got " + PlayerPrefs.GetInt("Stars" + GameController.instance.currentLevel.buildIndex, 0) + " stars on level " +
                           GameController.instance.currentLevel.levelNumber + " of HiveMind, can you beat that?";

        _shareSheet.URL = "https://itunes.apple.com/us/app/hivemind-free-space-puzzle/id1109489072?ls=1&mt=8";
#if UNITY_ANDROID
        _shareSheet.URL = "https://play.google.com/store/apps/details?id=com.rebeccaansems.hivemind";
#endif

        NPBinding.UI.SetPopoverPointAtLastTouchPosition(); // To show popover at last touch point on iOS. On Android, its ignored.
        NPBinding.Sharing.ShowView(_shareSheet, FinishedSharing);
    }
Example #5
0
    public void ShareGame()
    {
        SocialShareSheet _shareSheet = new SocialShareSheet();

        _shareSheet.Text = "I just got a" + PlayerPrefs.GetInt("Score0", 0) + " on Teeter Totter Lemming Dropper, can you beat that?";

#if UNITY_IOS
        _shareSheet.URL = "https://itunes.apple.com/us/app/teeter-totter-lemming-dropper/id1358140021?ls=1&mt=8";
#elif UNITY_ANDROID
        _shareSheet.URL = "https://play.google.com/store/apps/details?id=com.RebeccaAnsems.teetertotter&hl=en";
#endif

        // Show composer
        NPBinding.UI.SetPopoverPointAtLastTouchPosition(); // To show popover at last touch point on iOS. On Android, its ignored.
        NPBinding.Sharing.ShowView(_shareSheet, FinishedSharing);
    }
Example #6
0
    public void SocialShare()
    {
        // Create share sheet
        SocialShareSheet _shareSheet = new SocialShareSheet();

        _shareSheet.Text = m_shareMessage;

        // Add below line if you want to share URL
        _shareSheet.URL = m_shareURL;

        // Add below line if you want to share a screenshot
        _shareSheet.AttachScreenShot();


        // Show composer
        NPBinding.UI.SetPopoverPointAtLastTouchPosition(); // To show popover at last touch point on iOS. On Android, its ignored.
        NPBinding.Sharing.ShowView(_shareSheet, FinishedSharing);
    }
		private void ShareImageOnSocialNetwork ()
		{
			// Create share sheet
			SocialShareSheet _shareSheet 	= new SocialShareSheet();	
			_shareSheet.Text				= m_shareMessage;
			_shareSheet.AttachImageAtPath(GetImageFullPath());
			
			// Show composer
			NPBinding.UI.SetPopoverPointAtLastTouchPosition();
			NPBinding.Sharing.ShowView(_shareSheet, FinishedSharing);
		}
		private void ShareURLOnSocialNetwork ()
		{
			// Create share sheet
			SocialShareSheet _shareSheet 	= new SocialShareSheet();	
			_shareSheet.Text				= m_shareMessage;
			_shareSheet.URL					= m_shareURL;
			
			// Show composer
			NPBinding.UI.SetPopoverPointAtLastTouchPosition();
			NPBinding.Sharing.ShowView(_shareSheet, FinishedSharing);
		}