Exemplo n.º 1
0
        private void ShareTextMessageOnTwitter()
        {
            // Create composer
            TwitterShareComposer _composer = new TwitterShareComposer();

            _composer.Text = m_shareMessage;

            // Show share view
            NPBinding.Sharing.ShowView(_composer, FinishedSharing);
        }
Exemplo n.º 2
0
        private void ShareImageOnTwitter()
        {
            // Create composer
            TwitterShareComposer _composer = new TwitterShareComposer();

            _composer.Text = m_shareMessage;
            _composer.AttachImageAtPath(GetImageFullPath());

            // Show share view
            NPBinding.Sharing.ShowView(_composer, FinishedSharing);
        }
Exemplo n.º 3
0
        private void ShareScreenshotOnTwitter()
        {
            // Create composer
            TwitterShareComposer _composer = new TwitterShareComposer();

            _composer.Text = m_shareMessage;
            _composer.AttachScreenShot();

            // Show share view
            NPBinding.Sharing.ShowView(_composer, FinishedSharing);
        }
Exemplo n.º 4
0
        private void ShareURLOnTwitter()
        {
            // Create share sheet
            TwitterShareComposer _composer = new TwitterShareComposer();

            _composer.Text = m_shareMessage;
            _composer.URL  = m_shareURL;

            // Show composer
            NPBinding.Sharing.ShowView(_composer, FinishedSharing);
        }
        public override void OnEnter()
        {
#if USES_SHARING
            // Create composer
            TwitterShareComposer _composer = new TwitterShareComposer();

            if (!text.IsNone)
            {
                _composer.Text = text.Value;
            }

            if (!URL.IsNone)
            {
                _composer.URL = URL.Value;
            }

            // Add attachment
            if (attachmentOption != eAttachmentOption.None)
            {
                switch (attachmentOption)
                {
                case eAttachmentOption.AttachScreenshot:
                    _composer.AttachScreenShot();
                    break;

                case eAttachmentOption.AttachImage:
                    _composer.AttachImage((Texture2D)image.Value);
                    break;

                case eAttachmentOption.AttachImageAtPath:
                    _composer.AttachImageAtPath(imagePath.Value);
                    break;

                default:
                    Log("[Sharing] Unhandled option.");
                    break;
                }
            }

            // Show share view
            NPBinding.Sharing.ShowView(_composer, FinishedSharing);
#endif
        }