@ta-interaktiv/share-url-factory
v2.1.2
Published
Create URLs that can be used to share content.
Downloads
65
Readme
Share URL Factory
Installation
yarn add @ta-interaktiv/share-url-factory
Usage
import { shareURLFactory } from '@ta-interaktiv/share-url-factory'
let twitterUrl = shareURLFactory['twitter']({
url: 'http://interaktiv.tagesanzeiger.ch/2017/grossartiges-werk',
via: 'tagesanzeiger',
title: 'Schaut euch diese grossartige Grafik an!',
hashtags: ['TAGrafik', 'awesome']
})
let facebookUrl = shareURLFactory['facebook']({
url: 'http://interaktiv.tagesanzeiger.ch/2017/grossartiges-werk',
facebook_id: 123, // Facebook App ID, doesn't work without it.
hashtags: ['TAGrafik'] // Also as an array, but will only use the first
// item.
})