{"id":13576158,"url":"https://github.com/avdeev/vanilla-sharing","last_synced_at":"2025-05-16T07:00:58.652Z","repository":{"id":17541170,"uuid":"82199336","full_name":"avdeev/vanilla-sharing","owner":"avdeev","description":"Small (1.5 KB) simple tool for sharing url, title, description and image to VK, Facebook (Feed, Dialog, Button, Messenger), Reddit, Pinterest, Tumblr, Twitter, VK, OK, Mail.ru, LinkedIn, Whatsapp, Viber, Telegram, Line","archived":false,"fork":false,"pushed_at":"2025-01-20T14:45:44.000Z","size":6114,"stargazers_count":120,"open_issues_count":10,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-11T01:49:10.420Z","etag":null,"topics":["facebook","linkedin","mailru","messenger","odnoklassniki","reddit","sharing","social-buttons","social-network","telegram","tumblr","twitter","vanilla-sharing","vkontakte","whatsapp","whatsapp-sharing"],"latest_commit_sha":null,"homepage":"https://alexey-avdeev.com/vanilla-sharing/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avdeev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2017-02-16T16:09:13.000Z","updated_at":"2025-04-12T07:08:45.000Z","dependencies_parsed_at":"2023-02-18T22:30:50.141Z","dependency_job_id":"d3fb2bc7-d758-446a-8719-e849e0db3c37","html_url":"https://github.com/avdeev/vanilla-sharing","commit_stats":{"total_commits":672,"total_committers":16,"mean_commits":42.0,"dds":"0.44940476190476186","last_synced_commit":"688658b5b7d104c6c8aa84b1070fd5578a9e5662"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdeev%2Fvanilla-sharing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdeev%2Fvanilla-sharing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdeev%2Fvanilla-sharing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdeev%2Fvanilla-sharing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avdeev","download_url":"https://codeload.github.com/avdeev/vanilla-sharing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485025,"owners_count":22078764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["facebook","linkedin","mailru","messenger","odnoklassniki","reddit","sharing","social-buttons","social-network","telegram","tumblr","twitter","vanilla-sharing","vkontakte","whatsapp","whatsapp-sharing"],"created_at":"2024-08-01T15:01:07.496Z","updated_at":"2025-05-16T07:00:58.501Z","avatar_url":"https://github.com/avdeev.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"logo/VSred2.png\" alt=\"Vanilla Sharing\" height=\"200px\"\u003e\u003c/p\u003e\n\n# vanilla-sharing\n\nSmall (1.5 KB) simple tool for sharing url, title, description and image to VK, Facebook (Feed, Dialog, Button, Messenger), Twitter, Reddit, Pinterest, Tumblr, VK, OK, Mail.ru, LinkedIn, Whatsapp, Viber, Telegram, Line.\n\n[DEMO](https://avdeev.github.io/vanilla-sharing/demo)\n\n[![Build Status](https://github.com/avdeev/vanilla-sharing/workflows/Node%20CI/badge.svg)](https://github.com/avdeev/vanilla-sharing/actions?query=workflow%3A%22Node+CI%22)\n[![bundlephobia](https://badgen.net/bundlephobia/minzip/vanilla-sharing)](https://bundlephobia.com/result?p=vanilla-sharing)\n[![Coverage Status](https://coveralls.io/repos/github/avdeev/vanilla-sharing/badge.svg?branch=master)](https://coveralls.io/github/avdeev/vanilla-sharing?branch=master)\n[![npm](https://img.shields.io/npm/v/vanilla-sharing.svg)](https://www.npmjs.com/package/vanilla-sharing)\n[![npm](https://img.shields.io/npm/dm/vanilla-sharing.svg)](https://www.npmjs.com/package/vanilla-sharing)\n\n# Motivation\n\nAdding sharings to a project is digging in the documentation of the corresponding social networks. With this set of small functions, we have already done everything for you. Just take them and use!\n\n# Installation\n\n## From NPM\n\n```sh\nnpm install --save vanilla-sharing\n```\n\n## From unpkg CDN (you can use other)\n\n```html\n\u003cscript src=\"https://unpkg.com/vanilla-sharing\"\u003e\u003c/script\u003e\n```\n\n# Usage\n\n## From NPM\n\n```js\nimport { fbButton } from 'vanilla-sharing';\n\nfbButton({\n  url: 'https://alexey-avdeev.com/vanilla-sharing/',\n});\n```\n\n## From CDN\n\n```js\nVanillaSharing.fbButton({\n  url: 'https://alexey-avdeev.com/vanilla-sharing/',\n});\n```\n\n# API\n\n### `fbFeed(options)`\n\nShare on facebook.com via the Feed dialog\n\nDocumentation: https://developers.facebook.com/docs/sharing/reference/feed-dialog\n\n```js\nfbFeed({\n  url: string,\n  redirectUri: string,\n  fbAppId: string,\n})\n```\n\nYou can use `getFbFeedUrl(options)` for getting URL.\n\n### `fbShare(options)`\n\nShare on facebook.com via the Share dialog\n\nDocumentation: https://developers.facebook.com/docs/sharing/reference/share-dialog\n\n```js\nfbShare({\n  url: string,\n  redirectUri: string,\n  hashtag: string,\n  fbAppId: string,\n  quote: string,\n})\n```\n\nYou can use `getFbShareUrl(options)` for getting URL.\n\n### `fbButton(options)`\n\nShare on facebook.com using facebook share button\n\n```js\nfbButton({\n  url: string,\n})\n```\n\nYou can use `getFbButtonUrl(options)` for getting URL.\n\n### `messenger(options)`\n\nShare via Facebook Messenger\n\nShare method from [Sharing for Messenger](https://developers.facebook.com/docs/sharing/messenger).\n\n```js\nmessenger({\n  url: string,\n  fbAppId: string,\n})\n```\n\n### `tw(options)`\n\nShare on Twitter\n\n```js\ntw({\n  url: string,\n  title: string,\n  hashtags: array,\n})\n```\n\nYou can use `getTwUrl(options)` for getting URL.\n\n### `reddit(options)`\n\nShare on Reddit\n\n```js\nreddit({\n  url: string,\n  title: string,\n})\n```\n\n### `pinterest(options)`\n\n[Share on Pinterest](https://developers.pinterest.com/docs/widgets/save/?)\n\n```js\npinterest({\n  url: string,\n  description: string,\n  media: image url string,\n})\n```\n\n### `tumblr(options)`\n\n[Share on Tumblr](https://www.tumblr.com/docs/en/share_button)\n\n```js\ntumblr({\n  url: string,\n  title: string,\n  caption: string,\n  tags: array,\n})\n```\n\n### `vk(options)`\n\nShare on vk.com\n\n```js\nvk({\n  url: string,\n  title: string,\n  description: string,\n  image: string,\n  isVkParse: boolean,\n})\n```\n\nYou can use `getVkUrl(options)` for getting URL.\n\n### `ok(options)`\n\nShare on ok.ru\n\n[Like/Share button](https://apiok.ru/en/ext/like)\n\n```js\nok({\n  url: string,\n  title: string,\n  image: string,\n})\n```\n\nYou can use `getOkUrl(options)` for getting URL.\n\n### `mail(options)`\n\nShare on Mail.ru\n\n```js\nmail({\n  url: string,\n  title: string,\n  description: string,\n  image: string,\n})\n```\n\n### `email(options)`\n\nShare via user's email\n\n```js\nemail({\n  to: string,\n  url: string,\n  title: string,\n  description: string,\n  subject: string,\n})\n```\n\nYou can use `getEmailUrl(options)` for getting URL.\n\n### `linkedin(options)`\n\nShare on LinkedIn\n\nShare method from [Share on LinkedIn](https://developer.linkedin.com/docs/share-on-linkedin#).\n\n```js\nlinkedin({\n  url: string,\n  title: string,\n  description: string,\n})\n```\n\n### `whatsapp(options)`\n\nShare via Whatsapp\n\n[WhatsApp FAQ - Using Click to Chat](https://faq.whatsapp.com/en/android/26000030/).\n\n```js\nwhatsapp({\n  url: string,\n  title: string,\n  phone: string,\n})\n```\n\nYou can use `getWhatsappUrl(options)` for getting URL.\n\n### `viber(options)`\n\nShare via Viber\n\n[Viber Share Button docs](https://developers.viber.com/docs/tools/share-button/).\n\n```js\nviber({\n  url: string,\n  title: string,\n})\n```\n\nYou can use `getViberUrl(options)` for getting URL.\n\n### `telegram(options)`\n\nShare via Telegram\n\n```js\ntelegram({\n  url: string,\n  title: string,\n})\n```\n\nYou can use `getTelegramUrl(options)` for getting URL.\n\n### `line(options)`\n\nShare via Line\n\n```js\nline({\n  url: string,\n  title: string,\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favdeev%2Fvanilla-sharing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favdeev%2Fvanilla-sharing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favdeev%2Fvanilla-sharing/lists"}