Node.js NPM
Javascript based Node.js NPM Package for Ayrshare

Overview of Node JS Social Media Module

Install the Social-Post-API NPM Client Package if you use Node.js on the server-side. The package simplifies the calls by wrapping the RESTful calls.
Obtain your secret API Key at www.ayrshare.com

Installation

npm i social-post-api

General Usage

Examples of Post, History, and Delete:
const SocialPost = require("social-post-api");
const API_KEY = "API KEY"; // get an API Key at ayrshare.com
const social = new SocialPost(API_KEY);
const run = async () => {
/** post */
const post = await social.post({
post: "One more time",
platforms: ["twitter", "facebook", "linkedin"],
}).catch(console.error);
console.log(post);
/** history */
const history = await social.history().catch(console.error);
console.log(history);
/** delete */
const deletePost = await social.delete({ id: post.id }).catch(console.error);
console.log(deletePost);
};
run();

Video Overview of the Social Media API NPM Package

Post to Social Media via an API

More Information and Documentation

Copy link
On this page
Overview of Node JS Social Media Module
Installation
General Usage
Video Overview of the Social Media API NPM Package
More Information and Documentation