ShekarMudaliyar / social_share

Flutter package to share images/videos/text on social media
https://pub.dev/packages/social_share
MIT License
108 stars 175 forks source link

instagram story is not working! #82

Open juanmuller24 opened 3 years ago

juanmuller24 commented 3 years ago

posting stories instagram were working fine in my phone ( model of my phone - SM A217F) but all of sudden it stopped working and gives a 'error' response. it also does not work in most of friends phone. kindly do help me with this and solve the issue thank you!!

blackraven96 commented 3 years ago

Maybe you have to check this: https://developer.android.com/training/package-visibility

ArtemZip commented 3 years ago

hi, try to downgrade your compileSdkVersion and targetSdkVersion to 28 in build.gradle

taroooth commented 2 years ago

The workaround to set targetSdkVersion to 28 could not be used, because it will not be possible to upload App Bundle and APK to Google Play if targetSdkVersion is less than 30 from November 1, 2021. Please try adding the following to /android/app/main/AndroidManifest.xml.

<queries>
  <intent>
    <action android:name="android.intent.action.SEND" />
    <data android:mimeType="image/*" />
  </intent>
</queries>

reference -> https://developer.android.com/training/package-visibility/declaring?hl=ja#intent-filter-signature

In my environment, I was able to share to Instagram-stories and checkInstalledAppsForShare() also worked fine.

final installedApps = await SocialShare.checkInstalledAppsForShare() ?? {};
=> {twitter: true, facebook: true, sms: true, whatsapp: false, instagram: true, telegram: false}
Yoruss commented 2 years ago

Still got this error sometimes on both android and iOS, any tips or workaround ?

Sometimes it works fine, sometimes it crashes the app. Is seems that it works fine if it is the first action done after opening app (if Iopen the app and share something to insta, get back to app, and try to share again, it crashes though)