0.4.2 • Published 2 years ago

react-native-meta-share v0.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-meta-share

Share Images or Video to Facebook/Instagram

Installation

With npm:

> npm install @react-native-async-storage/async-storage

With Yarn:

> yarn add @react-native-async-storage/async-storage

Link

Android & iOS

Requires React Native 0.60+

CLI autolink feature links the module while building the app.

On iOS, use CocoaPods to add the native react-native-meta-share to your project:

> npx pod-install

Additional for iOS

You should write LSApplicationQueriesSchemes in info.plist:

	<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>fbapi</string>
		<string>instagram</string>
		<string>fb-messenger-share-api</string>
		<string>instagram-stories</string>
	</array>

Usage

import {
  sharePhotosToFacebook,
  shareVideoToFacebook,
  shareVideoToInstagram,
  shareImageToInstagram,
  shareToInstagramStory,
} from 'react-native-meta-share';

// ...

const result = await shareToInstagramStory('appid', {
  backgroundBottomColor: '#FFA500',
  backgroundTopColor: '#FF0000',
  stickerImageAsset: 'image uri',
  backgroundVideoAsset: 'video uri',
});

const result = await sharePhotosToFacebook(['image1 uri', 'image2 uri']);

const result = await shareVideoToFacebook('video uri');

const result = await shareVideoToInstagram('video uri');

const result = await shareImageToInstagram('image uri');

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.4.2

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.2

2 years ago

0.2.0

2 years ago