0.0.8 • Published 10 years ago
react-native-instagram-share v0.0.8
react-native-instagram-share
react-native interface to share images and videos within instagram (iOS)
Update
Instagram does not support the caption functionality anymore => http://developers.instagram.com/post/125972775561/removing-pre-filled-captions-from-mobile-sharing
Getting started
npm install react-native-instagram-share@latest --save- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-instagram-shareand addRNInstagramShare.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNInstagramShare.ato your project'sBuild Phases➜Link Binary With Libraries - Click
RNInstagramShare.xcodeprojin the project navigator and go theBuild Settingstab. Make sure 'All' is toggled on (instead of 'Basic'). Look forHeader Search Pathsand make sure it contains both$(SRCROOT)/../../react-native/Reactand$(SRCROOT)/../../../React- mark both asrecursive. - Run your project (
Cmd+R)
Usage
var RNInstagramShare = require('react-native-instagram-share');
var image = 'assets-library://asset/asset.JPG?id=C4E468CC-3B82-4822-8FEE-BA1C1DC47B4B&ext=JPG';
var video = 'assets-library://asset/asset.mov?id=4D8172B1-EE3A-43D7-97BF-951003BFE97A&ext=mov';
var caption = "Test Message";
RNInstagramShare.share(video, caption);Can be easily used together with react-native-camera (https://github.com/lwansbrough/react-native-camera)
Demo
