Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aestetype/node-social-api

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aestetype/node-social-api

Node social api

  • 0.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

npm version Build Status Coverage Status Dependency Status devDependency Status

node-social-api

Documentation

Examples

Social api client for node that support promises and callback. Include:

Install

npm install --save node-social-api

Usage

import { Instagram, Twitter, Facebook, Tumblr } from 'node-social-api';

// Instagram
const instagram = new Instagram({
  clientId: 'your-client-id',
  accessToken: 'user-access-token',
});

// Some get query with promise
instagram.get('users/self').then((data) => {
  console.log(data);
});

// Some get query with callback
instagram.get('users/self', (err, data) => {
  console.log(data);
});

// Create a new stream and only receive new messages
const stream = instagram.stream('tags/:tag-name/media/recent');

stream.on('message', (message) => {
  console.log(message);
});

// Twitter
const twitter = new Twitter({
  consumerKey: 'your-consumer-key',
  consumerSecret: 'your-consumer-secret',
  accessToken: 'your-access-token',
  accessTokenSecret: 'your-access-token-secret',
});

// Some get query
twitter.get('media/recent').then((data) => {
  console.log(data);
});

// Facebook
const facebook = new Facebook({
  appId: 'your-app-id',
  appSecret: 'your-app-secret',
});

// Some get query
facebook.get(':some-id').then((data) => {
  console.log(data);
});

// Tumblr
const tumblr = new Tumblr({
  consumerKey: 'your-consumer-key',
});

// Some get query
tumblr.get('blog/scipsy.tumblr.com/info').then((data) => {
  console.log(data);
});

// Github
const github = new Github({
  accessToken: 'your-access-token',
});

// Some get query
github.get(':some-github-route').then((data) => {
  console.log(data);
});

Keywords

FAQs

Package last updated on 20 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc