by vietlongn | v1.6.3
A NativeScript module to use the native url sharing widget
npm i --save nativescript-url-share

NativeScript Url Share Plugin

Forked from

A NativeScript plugin to use the native social sharing widget on Android and iOS. Currently this module supports image and text sharing.


Run the following command from the root of your project:

$ tns plugin add nativescript-url-share

This command automatically installs the necessary files, as well as stores nativescript-url-share as a dependency in your project's package.json file.


To use the social share module you must first require() it. After you require() the module you have access to its APIs.

// ------------ JavaScript ------------------
var UrlShare = require("nativescript-url-share");

// ------------- TypeScript ------------------
import * as UrlShare from "nativescript-url-share";


shareUrl(String url, String text, [optional] String subject)

The shareUrl() method excepts a url and a string.

UrlShare.shareUrl("", "Home of NativeScript");

You can optionally pass shareUrl() a second argument to configure the subject on Android:

UrlShare.shareUrl("", "Home of NativeScript", "How would you like to share this url?");


Looking for some extra help getting social sharing working in your mobile application? Check out these resources: