Open roberto701 opened 2 years ago
Same problem
I can't share a simple text on iOS, is working fine on Android. I also tried without hashtags same issue.
My code:
await SocialShare.shareTwitter(
captionText,
hashtags: defaultHashtags,
);
Info.plist
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-share-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
<string>https</string>
<string>http</string>
<string>mailto</string>
<string>instagram-stories</string>
<string>facebook</string>
<string>facebook-stories</string>
<string>instagram</string>
<string>instagram-stories</string>
<string>twitter</string>
<string>whatsapp</string>
</array>
@juanagu me too,It just returns the data, but it doesn't open the Twitter app on ios. Android is ok.
Mine also will not open the Twitter app.
me too...
@juanagu me too,It just returns the data, but it doesn't open the Twitter app on ios. Android is ok.
I made this workaround for iOS:
final hashtags = defaultHashtags.join(' #');
final message = '$captionText \n #$hashtags';
await urlLauncherHelper.openUrl(
'twitter://post?'
'message=${Uri.encodeComponent(message)}',
);
If you want to use the plugin for Android and add the workaround for iOS this is the code:
if (Platform.isAndroid) {
await SocialShare.shareTwitter(
captionText,
hashtags: defaultHashtags,
);
} else {
final hashtags = defaultHashtags.join(' #');
final message = '$captionText \n #$hashtags';
await urlLauncherHelper.openUrl(
'twitter://post?'
'message=${Uri.encodeComponent(message)}',
);
}
fb-messenger-share-api
can you share in messenger? I need make this.
I can't post image to twitter. It seems this library doesn't support yet. How can I solve it?