Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ShekarMudaliyar/social_share
Flutter package to share images/videos/text on social media
https://github.com/ShekarMudaliyar/social_share
Last synced: 3 months ago
JSON representation
Flutter package to share images/videos/text on social media
- Host: GitHub
- URL: https://github.com/ShekarMudaliyar/social_share
- Owner: ShekarMudaliyar
- License: mit
- Created: 2019-12-09T07:16:52.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-24T03:25:50.000Z (8 months ago)
- Last Synced: 2024-08-03T14:10:08.273Z (7 months ago)
- Language: Dart
- Homepage: https://pub.dev/packages/social_share
- Size: 13.4 MB
- Stars: 105
- Watchers: 4
- Forks: 170
- Open Issues: 108
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# social_share
Wide variety of sharing options you'll need to share directly to certain popular apps or just share with default native share.
## Introduction
Works on both platforms `Android` and `iOS`
It provides you with most of the popular sharing options
With this plugin you can share on instagram stories and facebook stories and also copy to clipboard## Usage
### Android Configuration
#### Paste the following attribute in the `manifest` tag in the `android/app/src/main/AndroidManifest.xml`:
```
`xmlns:tools="http://schemas.android.com/tools"`
```##### For example:
```
```#### Add this piece of code in the `manifest/application` in the `android/app/src/main/AndroidManifest.xml`:
```
```#### Create a xml file named `filepaths.xml` in the `app/src/main/res/xml` folder and paste this code in the file :
```
```
### iOS Configuration
#### Add this to your `Info.plist` to use share on instagram and facebook story
```
LSApplicationQueriesSchemes
instagram-stories
facebook-stories
tg
```### Add this if you are using share on facebook. For this you have to create an app on https://developers.facebook.com/ and get the App ID
```
FacebookAppID
xxxxxxxxxxxxxxx
```#### shareInstagramStory
```
SocialShare.shareInstagramStory(imageFile.path, "#ffffff",
"#000000", "https://deep-link-url");
```#### shareInstagramStorywithBackground
```
SocialShare.shareInstagramStorywithBackground(image.path, "https://deep-link-url",
backgroundImagePath: backgroundimage.path);
```#### shareFacebookStory
For iOS
```
SocialShare.shareFacebookStory(image.path,"#ffffff","#000000",
"https://deep-link-url","facebook-app-id");
```For Android
appID is mandatory if using shareFacebookStory or else it wont work```
SocialShare.shareFacebookStory(image.path,"#ffffff","#000000",
"https://deep-link-url","facebook-app-id",
appId: "xxxxxxxxxxxxx");
```#### copyToClipboard
```
SocialShare.copyToClipboard("This is Social Share plugin");
```#### shareTwitter
```
//without hashtags
SocialShare.shareTwitter("This is Social Share plugin");//with hashtags
SocialShare.shareTwitter(
"This is Social Share twitter example",
hashtags: ["hello", "world", "foo", "bar"]);//with hashtags and link
SocialShare.shareTwitter(
"This is Social Share twitter example",
hashtags: ["hello", "world", "foo", "bar"],url:"https://your-url-here/");
```#### shareSms
```
//without url link in message
SocialShare.shareSms("This is Social Share Sms example");//with url link in message
SocialShare.shareSms("This is Social Share Sms example",url: "https://your-url-here/");
```#### shareWhatsapp
```
SocialShare.shareWhatsapp("Hello World");
```#### shareTelegram
```
SocialShare.shareTelegram("Hello World");
```#### shareOptions
This will open the default native share options
```
//without an image
SocialShare.shareOptions("Hello world");//with an image
SocialShare.shareOptions("Hello world",imagePath: image.path);
```#### checkInstalledAppsForShare
```
SocialShare.checkInstalledAppsForShare();
```# Here's few demo!
## Story share on Instagram

## Story share on Facebook

## Copy to Clipboard

# Known issues
On Android 6, Share to Instagram Stories may not open Instagram app or load the specified image.
# Buy me a :coffee: !!
((More coffee == more code) == faster updates)
[](https://paypal.me/b1naryishere/10)