{"id":19220099,"url":"https://github.com/nativescript-community/ui-social-share","last_synced_at":"2026-06-22T14:31:26.013Z","repository":{"id":94068087,"uuid":"293813281","full_name":"nativescript-community/ui-social-share","owner":"nativescript-community","description":"♻️ A NativeScript plugin for using the iOS/Android social sharing widgets","archived":false,"fork":false,"pushed_at":"2020-09-10T14:03:56.000Z","size":4075,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T18:03:10.493Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nativescript-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["farfromrefug"]}},"created_at":"2020-09-08T13:07:20.000Z","updated_at":"2024-01-08T19:45:42.000Z","dependencies_parsed_at":"2023-07-26T23:21:11.684Z","dependency_job_id":null,"html_url":"https://github.com/nativescript-community/ui-social-share","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/nativescript-community/ui-social-share","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fui-social-share","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fui-social-share/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fui-social-share/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fui-social-share/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nativescript-community","download_url":"https://codeload.github.com/nativescript-community/ui-social-share/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativescript-community%2Fui-social-share/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34653712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T14:33:59.900Z","updated_at":"2026-06-22T14:31:25.986Z","avatar_url":"https://github.com/nativescript-community.png","language":"Objective-C","funding_links":["https://github.com/sponsors/farfromrefug"],"categories":[],"sub_categories":[],"readme":"# NativeScript Social Share Plugin\n\nA NativeScript plugin to use the native social sharing widget on Android and iOS. Currently this module supports image and text sharing.\n\n![](screenshots/ios.png)\n![](screenshots/android.png)\n\n## Installation\n\nRun the following command from the root of your project:\n\n```\n$ tns plugin add nativescript-social-share\n```\n\nThis command automatically installs the necessary files, as well as stores nativescript-social-share as a dependency in your project's `package.json` file.\n\n\n## Usage\n\nTo use the social share module you must first `require()` it. After you `require()` the module you have access to its APIs.\n\n``` JavaScript\n// ------------ JavaScript ------------------\nvar SocialShare = require(\"nativescript-social-share\");\n\n// ------------- TypeScript ------------------\nimport * as SocialShare from \"nativescript-social-share\";\n```\n\n## API\n\n### shareImage(ImageSource image, [optional] String subject)\n\nThe `shareImage()` method expects an [`ImageSource`](http://docs.nativescript.org/ApiReference/image-source/ImageSource.html) object. The code below loads an image from the app and invokes the share widget with it:\n\n``` JavaScript\n// ------------ JavaScript ------------------\nvar SocialShare = require(\"nativescript-social-share\");\nvar imageSourceModule = require(\"image-source\");\n\nvar image = imageSourceModule.fromFile(\"~/path/to/myImage.jpg\");\nSocialShare.shareImage(image);\n\n// ------------- TypeScript ------------------\nimport * as SocialShare from \"nativescript-social-share\";\nimport { ImageSource } from \"image-source\";\n\nlet image = ImageSource.fromFile(\"~/path/to/myImage.jpg\");\nSocialShare.shareImage(image);\n```\n\nYou can optionally provide a second argument to configure the subject on Android:\n\n``` JavaScript\nSocialShare.shareImage(image, \"How would you like to share this image?\");\n```\n\n### shareText(String text, [optional] String subject)\n\nThe `shareText()` method expects a simple string:\n\n``` js\nSocialShare.shareText(\"I love NativeScript!\");\n```\n\nLike `shareImage()`, you can optionally pass `shareText()` a second argument to configure the subject on Android:\n\n``` js\nSocialShare.shareText(\"I love NativeScript!\", \"How would you like to share this text?\");\n```\n\n### shareUrl(String url, String text, [optional] String subject)\n\nThe `shareUrl()` method excepts a url and a string.\n\n``` js\nSocialShare.shareUrl(\"https://www.nativescript.org/\", \"Home of NativeScript\");\n```\n\nYou can optionally pass `shareUrl()` a second argument to configure the subject on Android:\n\n``` js\nSocialShare.shareUrl(\"https://www.nativescript.org/\", \"Home of NativeScript\", \"How would you like to share this url?\");\n```\n\n## Tutorials\n\nLooking for some extra help getting social sharing working in your mobile application? Check out these resources:\n\n* [Social Media Sharing in a Vanilla NativeScript Application](https://www.thepolyglotdeveloper.com/2016/03/implement-social-media-sharing-nativescript-app/)\n* [Social Media Sharing in a NativeScript with Angular Application](https://www.thepolyglotdeveloper.com/2017/02/social-media-sharing-prompts-nativescript-angular-application/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript-community%2Fui-social-share","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnativescript-community%2Fui-social-share","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript-community%2Fui-social-share/lists"}