Example #1
0
        private void ShareScreenshotOnFB()
        {
            // Create composer
            FBShareComposer _composer = new FBShareComposer();

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

            // Show share view
            NPBinding.Sharing.ShowView(_composer, FinishedSharing);
        }
Example #2
0
        public override void OnEnter()
        {
#if USES_SHARING
            // Create composer
            FBShareComposer _composer = new FBShareComposer();

            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
        }