share_stories

Last updated:

0 purchases

share_stories Image
share_stories Images
Add to Cart

Description:

share stories

share_stories #
A plugin designed to share yor media in stories on Instagram/Facebook and reels on Facebook.
Getting Started #
Android #
Add uses permission in android/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
copied to clipboard
Add provider in android/src/main/AndroidManifest.xml
<provider android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.flutter.social_share"
android:exported="false"
android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_provider_paths" />
</provider>
copied to clipboard
Create file in android/src/main/res/xml/file_provider_paths.xml and add
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="external" path="." />
<external-files-path name="external_files" path="." />
<external-cache-path name="external_cache" path="." />
<files-path name="files" path="." />
</paths>
copied to clipboard
On Android 11 or higher it is necessary to enter a queries in android/src/main/AndroidManifest.xml
For Story Instagram Images:
<queries>
<intent>
<action android:name='com.instagram.share.ADD_TO_STORY' />
<data android:mimeType='image/*' />
</intent>
</queries>
copied to clipboard
For Story Instagram Video:
<queries>
<intent>
<action android:name='com.instagram.share.ADD_TO_STORY' />
<data android:mimeType='video/*' />
</intent>
</queries>
copied to clipboard
For Story Facebook Images:
<queries>
<intent>
<action android:name='com.facebook.stories.ADD_TO_STORY' />
<data android:mimeType='image/*' />
</intent>
</queries>
copied to clipboard
For Story Facebook Videos:
<queries>
<intent>
<action android:name='com.facebook.stories.ADD_TO_STORY' />
<data android:mimeType='video/*' />
</intent>
</queries>
copied to clipboard
For Reels Facebook Videos:
<queries>
<intent>
<action android:name='com.facebook.reels.SHARE_TO_REEL' />
<data android:mimeType='video/*' />
</intent>
</queries>
copied to clipboard
Usage #
Share to Instagram Story #
ShareStories.shareToInstagram(
backgroundAssetUri: file.uri,
stickerAssetUri: image.uri,
topColor: Colors.blue,
bottomColor: Colors.red
);
copied to clipboard

Facebook requires you to have an app registered in Meta for Developers and use the key *

Share to Facebook Story #
ShareStories.shareToStoryFacebook(
backgroundAssetUri: file.uri,
stickerAssetUri: image.uri,
topColor: Colors.blue,
bottomColor: Colors.red
appID: "xxxxxxxxxxxxxxxx"
);
copied to clipboard
Share to Facebook Reels #
ShareStories.shareToReelsFacebook(
backgroundAssetUri: file.uri,
stickerAssetUri: image.uri,
topColor: Colors.blue,
bottomColor: Colors.red
appID: "xxxxxxxxxxxxxxxx"
);
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.