npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

social-api

v0.0.9

Published

Easily setup and query APIs from the major social networks, in a single package. if you are searching for a way to login users and obtain auth tokens, see social-login instead.

Downloads

5

Readme

Social API

Social API is a NodeJS library that makes it easier to query various social sites' APIs.

Support

The support is currently limited, due to the project being under development.

The syntax, method names and parameters names are not stable.

Push requests are welcome.

We partially support:

  • Facebook page
  • Twitter
  • Instagram
  • Github

Setup

npm install social-api

var socialApi = require('social-api');

Facebook

Page

var page = new socialApi.facebook.page({
    appid:		"App ID",
	appsecret:	"App Secret",
    uid:		"User UID",
	authtoken:	"user Authtoken"
}, function(pageInstance) {
    pageInstance.list(function(fbpages) {
        // fbpages is an array of facebook pages owned by the user
    });
}

Instagram

var instagram = new socialApi.instagram({
    clientId:        "App ID",
	clientSecret:	"App Secret",
	token:	        "user Authtoken"
}, function(instagramInstance) {
    instagramInstance.recent(function(pictures) {
        // pictures is an array of pictures posted by the user
    });
}

Twitter

var twitter = new socialApi.twitter({
    consumer_key:           "consumer_key",
    consumer_secret:	    "consumer_secret",
    access_token_key:       "access_token_key",
    access_token_secret:	"access_token_secret"
}, function(twitterInstance) {
    twitterInstance.timeline('username', 20 /*count*/, function(tweets) {
        // tweets is an array of tweets posted by the user
    });
    twitterInstance.followers('username', 20 /*count*/, function(followers) {
        // followers is an array of the user's followers
    });
}

Github

var github = new socialApi.github({
    token:	        "user Authtoken"
}, function(githubInstance) {
    githubInstance.repositories(function(repositories) {
        // repositories is an array the user's repositories
    });
    githubInstance.orgs(function(orgs) {
        // orgs is an array the user's organizations
    });
    githubInstance.gists(function(gists) {
        // gists is an array the user's gists
    });
}