/// <summary> /// Shows a view to compose and send Tweet message. /// </summary> /// <param name="_message">The initial text for the Tweet.</param> /// <param name="_onCompletion">Callback that will be called after operation is completed.</param> public void ShowTweetComposerWithScreenshot(string _message, TWTRTweetCompletion _onCompletion) { // First capture screenshot, once its done tweet about it StartCoroutine(TextureExtensions.TakeScreenshot((_texture) => { ShowTweetComposerWithImage(_message, _texture, _onCompletion); })); }
/// <summary> /// Presents composer to tweet text along with URL and image. /// </summary> /// <param name="_message">The text to tweet.</param> /// <param name="_URL">URL to be shared.</param> /// <param name="_imgByteArray">The image data to be attached along with the tweet.</param> /// <param name="_onCompletion">Calls the delegate when the user finished or cancelled the Tweet composition.</param> public virtual void ShowTweetComposer(string _message, string _URL, byte[] _imgByteArray, TWTRTweetCompletion _onCompletion) { // Pause unity player this.PauseUnity(); // Cache callback OnTweetComposerClosed = _onCompletion; }
/// <summary> /// Shows a view to compose and send Tweet message. /// </summary> /// <param name="_message">The initial text for the Tweet.</param> /// <param name="_URL">URL that has to be shared in the Tweet.</param> /// <param name="_onCompletion">Callback that will be called after operation is completed.</param> public void ShowTweetComposerWithLink(string _message, string _URL, TWTRTweetCompletion _onCompletion) { if (string.IsNullOrEmpty(_URL)) { Console.LogWarning(Constants.kDebugTag, "[Twitter] Showing tweet composer with message only, URL is null/empty"); } // Show tweet composer ShowTweetComposer(_message, _URL, null, _onCompletion); }
public override void ShowTweetComposer (string _message, string _URL, byte[] _imgByteArray, TWTRTweetCompletion _onCompletion) { base.ShowTweetComposer(_message, _URL, _imgByteArray, _onCompletion); // Feature isnt supported Console.LogError(Constants.kDebugTag, Constants.kErrorMessage); // Associated error event is raised TweetComposerDismissed(((int)eTwitterComposerResult.CANCELLED).ToString()); }
/// <summary> /// Shows a view to compose and send Tweet message. /// </summary> /// <param name="_message">The initial text for the Tweet.</param> /// <param name="_texture">Unity texture object that has to be shared in the Tweet.</param> /// <param name="_onCompletion">Callback that will be called after operation is completed.</param> public void ShowTweetComposerWithImage(string _message, Texture2D _texture, TWTRTweetCompletion _onCompletion) { byte[] _imgByteArray = null; // Convert texture into byte array if (_texture != null) { _imgByteArray = _texture.EncodeToPNG(); } else { Console.LogWarning(Constants.kDebugTag, "[Twitter] Showing tweet composer with message only, texure is null"); } // Show tweet composer ShowTweetComposer(_message, null, _imgByteArray, _onCompletion); }
/// <summary> /// Shows a view to compose and send Tweet message. /// </summary> /// <param name="_message">The initial text for the Tweet.</param> /// <param name="_URL">URL that has to be shared in the Tweet.</param> /// <param name="_imgByteArray">Raw image data that has to be shared in the Tweet.</param> /// <param name="_onCompletion">Callback that will be called after operation is completed.</param> public virtual void ShowTweetComposer(string _message, string _URL, byte[] _imgByteArray, TWTRTweetCompletion _onCompletion) { // Pause unity player this.PauseUnity(); // Cache callback OnTweetComposerClosed = _onCompletion; #if USES_SOOMLA_GROW bool _tweetingMessage = (_URL == null && _imgByteArray == null); eSocialActionType _actionType = _tweetingMessage ? eSocialActionType.UPDATE_STATUS : eSocialActionType.UPDATE_STORY; // Cache information m_lastTweetWasTextOnly = _tweetingMessage; // Report this event NPBinding.SoomlaGrowService.ReportOnSocialActionStarted(_actionType, eSocialProvider.TWITTER); #endif }
public override void ShowTweetComposer (string _message, string _URL, byte[] _imgByteArray, TWTRTweetCompletion _onCompletion) { base.ShowTweetComposer(_message, _URL, _imgByteArray, _onCompletion); // Get byte array length int _arrayLength = (_imgByteArray == null) ? 0 : _imgByteArray.Length; // Native method is called Plugin.Call(Native.Methods.SHOW_TWEET_COMPOSER, _message, _URL, _imgByteArray, _arrayLength); }
public override void ShowTweetComposer(string _message, string _URL, byte[] _imgByteArray, TWTRTweetCompletion _onCompletion) { base.ShowTweetComposer(_message, _URL, _imgByteArray, _onCompletion); // Feature isnt supported Console.LogError(Constants.kDebugTag, Constants.kFeatureNotSupported); // Associated error event is raised TweetComposerDismissed(((int)eTwitterComposerResult.CANCELLED).ToString()); }
/// <summary> /// Presents composer to tweet text. /// </summary> /// <param name="_message">The text to tweet.</param> /// <param name="_onCompletion">Calls the delegate when the user finished or cancelled the Tweet composition.</param> public void ShowTweetComposerWithMessage (string _message, TWTRTweetCompletion _onCompletion) { ShowTweetComposer(_message, null, null, _onCompletion); }
public override void ShowTweetComposer(string _message, string _URL, byte[] _imgByteArray, TWTRTweetCompletion _onCompletion) { base.ShowTweetComposer(_message, _URL, _imgByteArray, _onCompletion); Console.LogError(Constants.kDebugTag, Constants.kNotSupportedInEditor); TweetComposerDismissed(((int)eTwitterComposerResult.CANCELLED).ToString()); }
public override void ShowTweetComposer (string _message, string _URL, byte[] _imgByteArray, TWTRTweetCompletion _onCompletion) { base.ShowTweetComposer(_message, _URL, _imgByteArray, _onCompletion); // Get byte array length int _arrayLength = 0; if (_imgByteArray != null) _arrayLength = _imgByteArray.Length; // Native method is called showTweetComposer(_message, _URL, _imgByteArray, _arrayLength); }
/// <summary> /// Presents composer to tweet text along with URL and image. /// </summary> /// <param name="_message">The text to tweet.</param> /// <param name="_URL">URL to be shared.</param> /// <param name="_imgByteArray">The image data to be attached along with the tweet.</param> /// <param name="_onCompletion">Calls the delegate when the user finished or cancelled the Tweet composition.</param> public virtual void ShowTweetComposer (string _message, string _URL, byte[] _imgByteArray, TWTRTweetCompletion _onCompletion) { // Pause unity player this.PauseUnity(); // Cache callback OnTweetComposerClosed = _onCompletion; }
/// <summary> /// Presents composer to tweet text along with URL. /// </summary> /// <param name="_message">The text to tweet.</param> /// <param name="_URL">URL to be shared.</param> /// <param name="_onCompletion">Calls the delegate when the user finished or cancelled the Tweet composition.</param> public void ShowTweetComposerWithLink (string _message, string _URL, TWTRTweetCompletion _onCompletion) { if (string.IsNullOrEmpty(_URL)) { Console.LogWarning(Constants.kDebugTag, "[Twitter] Showing tweet composer with message only, URL is null/empty"); } // Show tweet composer ShowTweetComposer(_message, _URL, null, _onCompletion); }
/// <summary> /// Presents composer to tweet text along with attached image. /// </summary> /// <param name="_message">The text to tweet.</param> /// <param name="_texture">The image to attached along with tweet message.</param> /// <param name="_onCompletion">Calls the delegate when the user finished or cancelled the Tweet composition.</param> public void ShowTweetComposerWithImage (string _message, Texture2D _texture, TWTRTweetCompletion _onCompletion) { byte[] _imgByteArray = null; // Convert texture into byte array if (_texture != null) { _imgByteArray = _texture.EncodeToPNG(); } else { Console.LogWarning(Constants.kDebugTag, "[Twitter] Showing tweet composer with message only, texure is null"); } // Show tweet composer ShowTweetComposer(_message, null, _imgByteArray, _onCompletion); }
/// <summary> /// Presents composer to tweet text along with screenshot. /// </summary> /// <param name="_message">The text to tweet.</param> /// <param name="_onCompletion">Calls the delegate when the user finished or cancelled the Tweet composition.</param> public void ShowTweetComposerWithScreenshot (string _message, TWTRTweetCompletion _onCompletion) { // First capture screenshot, once its done tweet about it StartCoroutine(TextureExtensions.TakeScreenshot((_texture)=>{ ShowTweetComposerWithImage(_message, _texture, _onCompletion); })); }
public override void ShowTweetComposer(string _message, string _URL, byte[] _imgByteArray, TWTRTweetCompletion _onCompletion) { base.ShowTweetComposer(_message, _URL, _imgByteArray, _onCompletion); // Get byte array length int _arrayLength = 0; if (_imgByteArray != null) { _arrayLength = _imgByteArray.Length; } // Native method is called showTweetComposer(_message, _URL, _imgByteArray, _arrayLength); }
public override void ShowTweetComposer(string _message, string _URL, byte[] _imgByteArray, TWTRTweetCompletion _onCompletion) { base.ShowTweetComposer(_message, _URL, _imgByteArray, _onCompletion); // Get byte array length int _arrayLength = (_imgByteArray == null) ? 0 : _imgByteArray.Length; // Native method is called Plugin.Call(Native.Methods.SHOW_TWEET_COMPOSER, _message, _URL, _imgByteArray, _arrayLength); }
/// <summary> /// Shows a view to compose and send Tweet message. /// </summary> /// <param name="_message">The initial text for the Tweet.</param> /// <param name="_onCompletion">Callback that will be called after operation is completed.</param> public void ShowTweetComposerWithMessage(string _message, TWTRTweetCompletion _onCompletion) { ShowTweetComposer(_message, null, null, _onCompletion); }