Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tisankan/social-share-links-generator
Node.js package for generating social media share links for popular platforms.
https://github.com/tisankan/social-share-links-generator
facebook linkedin nodejs share-links social-media twitter
Last synced: 6 days ago
JSON representation
Node.js package for generating social media share links for popular platforms.
- Host: GitHub
- URL: https://github.com/tisankan/social-share-links-generator
- Owner: Tisankan
- Created: 2024-02-18T14:03:17.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-02-18T14:19:10.000Z (9 months ago)
- Last Synced: 2024-02-19T15:27:55.865Z (9 months ago)
- Topics: facebook, linkedin, nodejs, share-links, social-media, twitter
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Social Media Share Links Generator
A simple Node.js package for generating social media share links for popular platforms.
## Installation
```bash
npm install social-share-links-generator
````
## Usage```javascript
const SocialShare = require('social-share-links-generator');
const socialShare = new SocialShare();
const twitterLink = socialShare.generateTwitterLink('Check out this awesome package!', 'https://example.com');
const facebookLink = socialShare.generateFacebookLink('https://example.com');
const linkedinLink = socialShare.generateLinkedInLink('Awesome Package', 'Generate social share links easily!', 'https://example.com');console.log('Twitter Share Link:', twitterLink);
console.log('Facebook Share Link:', facebookLink);
console.log('LinkedIn Share Link:', linkedinLink);
```## API
`generateTwitterLink(text, url)`Generates a Twitter share link with the provided text and URL.
`text` (string): The text to be included in the tweet.
`url` (string): The URL to be included in the tweet.
`generateFacebookLink(url)`
Generates a Facebook share link with the provided URL.
`url `(string): The URL to be shared on Facebook.
`generateLinkedInLink(title, summary, url)`
Generates a LinkedIn share link with the provided title, summary, and URL.
`title` (string): The title of the shared content.
`summary` (string): A brief summary or description of the shared content.
`url` (string): The URL to be shared on LinkedIn.
## Author
Name: TisankanEmail: [email protected]
## License
This project is licensed under the MIT License - see the LICENSE file for details.