appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
193 stars 230 forks source link

[ BUG ] : Twitter share character limit issue: Unable to post tweet. #288

Closed ucpritam closed 4 months ago

ucpritam commented 5 months ago

Plugin name Appinio social share.

Describe the bug I cannot post a tweet even if my Twitter character limit is under 280 characters. I am using the appinioSocialShare.iOS.shareToTwitter() method.

To Reproduce Steps to reproduce the behavior:

  1. Use appinio_social_share: ^0.3.1
  2. Pass some text to appinioSocialShare.iOS.shareToTwitter().
  3. Post icon is disabled and twitter character limit is showing in negative.

Expected behavior I should be able to post tweet as my character limit is under 280 characters.

Screenshots Screenshot 2024-05-23 at 15 11 02 Screenshot 2024-05-23 at 15 23 17

Smartphone:

Here is my code await appinioSocialShare.iOS.shareToTwitter(message, file.path);

ucpritam commented 5 months ago

Any fix? @khanmujeeb687

khanmujeeb687 commented 4 months ago

Hey @ucpritam , could you please try once without emojis? Just plain text? or text with image.

ucpritam commented 4 months ago

@khanmujeeb687, I have tried using plain text, but the issue persists. I have identified the bug in you code which exists in ShareUtil.swift (Line no. 479), where you are adding the text twice. Although this works on older iOS versions, this problem occurs on the latest iOS version (> iOS 16).

khanmujeeb687 commented 4 months ago

Hey @ucpritam , I have added a condition for that line now based on ios version, and it still works for ios 18 beta. I hope this will fix your issue. This change will be available in next version of our plugin. Thanks :)

ucpritam commented 4 months ago

Great Thanks!