npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

nativescript-instagram-share

1.0.5 • Public • Published

Nativescript Instagram Share(Currently for Android)

Instagram share plugin will allow you to directly share image to instagram app.

Requirements

working only for android

Installation

tns plugin add nativescript-instagram-share

TypeScript support

And do yourself a favor by adding TypeScript support to your nativeScript app:

tns install typescript

Now you can import the plugin as an object into your .ts file as follows:

import { shareInstagram } from 'nativescript-instagram-share';

Usage

```
    import * as imageSource from "tns-core-modules/image-source";
    let url=imageUrl; //image url if you want to share remote image
    let imageSrc:imageSource.ImageSource;
    getImage(url).then((r)=> {
        //// Argument (r) is ImageSource!
        console.log("Image download  complete")
        imageSrc=r;
    }, (e)=> {
        //// Argument (e) is Error!
    });
    shareInstagram(imageSrc).then((r)=>{
        console.log("instagram open succcessfully");
    }).catch((e)=>{
        console.log("instagram is not installed");
    });
```

ToDo

implement IOS version.

License

Apache License Version 2.0, January 2004

install

npm i nativescript-instagram-share

Downloadsweekly downloads

4

version

1.0.5

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability