# sharing-metrics

> Asynchronous social sharing metrics

Latest version **2.0.0** (published 2016-01-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install sharing-metrics
pnpm add sharing-metrics
yarn add sharing-metrics
bun add sharing-metrics
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2016-01-12 |
| First published | 2015-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Newsela |
| Maintainers | codenameyau |
| Keywords | social, share, sharing, icons, count, metrics, facebook, twitter, pinterest |

## Links

- npm: https://www.npmjs.com/package/sharing-metrics
- Repository: https://github.com/newsela/sharing-metrics
- Homepage: https://github.com/newsela/sharing-metrics#readme
- Issues: https://github.com/newsela/sharing-metrics/issues
- npm.io page: https://npm.io/package/sharing-metrics

## Dependencies (1)

- [async](https://npm.io/package/async.md) ^1.4.2

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2016-01-12
- 1.0.1 — 2015-08-20
- 1.0.0 — 2015-08-19

## README

# sharing-metrics

This is an node module to asynchronously retrieve social sharing metrics.
Please see the example to get started.

### Installation
```
npm install sharing-metrics --save
```

### API Providers
These are the available providers.

- facebook: `https://api.facebook.com/method/links.getStats?format=json&urls=`
- pinterest: `http://api.pinterest.com/v1/urls/count.json?url=`

### Documentation

```javascript
var shares = require('sharing-metrics');

// Enable a provider.
shares.enable('pinterest');

// Disable a provider.
shares.disable('facebook');

// Sample URL to track sharing metrics.
var url = 'https://newsela.com/articles/puertorico-economy/';

// Call `getCount` which takes in the url and a callback.
shares.getCount(url, function(error, tally) {
  console.log(tally);
});
```

**Sample output**
```
{ total: 1, pinterest: 1 }
```

### Contributions
Contributions are welcomed! Please fork this repo or file an issue if would
like to add another provider. Documentation and examples are also welcomed.

---
_Source: https://npm.io/package/sharing-metrics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
