All Projects → eldimious → Network Avatar Picker

eldimious / Network Avatar Picker

Licence: apache-2.0
A npm module that returns user's social network avatar. Supported providers: facebook, instagram, twitter, tumblr, vimeo, github, youtube and gmail

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Network Avatar Picker

Socialcounters
jQuery/PHP - Collection of Social Media APIs that display number of your social media fans. Facebook Likes, Twitter Followers, Instagram Followers, YouTube Subscribers, etc..
Stars: ✭ 104 (+40.54%)
Mutual labels:  vimeo, tumblr, youtube, twitter, facebook, instagram
Skraper
Kotlin/Java library and cli tool for scraping posts and media from various sources with neither authorization nor full page rendering (Facebook, Instagram, Twitter, Youtube, Tiktok, Telegram, Twitch, Reddit, 9GAG, Pinterest, Flickr, Tumblr, IFunny, VK, Pikabu)
Stars: ✭ 72 (-2.7%)
Mutual labels:  tumblr, youtube, twitter, facebook, instagram
Embera
A Oembed consumer library, that gives you information about urls. It helps you replace urls to youtube or vimeo for example, with their html embed code. It has advanced features like offline support, responsive embeds and caching support.
Stars: ✭ 268 (+262.16%)
Mutual labels:  vimeo, youtube, twitter, facebook, instagram
Feeds
Importiert Daten aus API-Quellen wie Facebook, Instagram, Twitter, YouTube, Vimeo oder RSS (ehemals YFeed)
Stars: ✭ 34 (-54.05%)
Mutual labels:  youtube, twitter, facebook, instagram
Socialreaper
Social media scraping / data collection library for Facebook, Twitter, Reddit, YouTube, Pinterest, and Tumblr APIs
Stars: ✭ 338 (+356.76%)
Mutual labels:  tumblr, youtube, twitter, facebook
Reaper
Social media scraping / data collection tool for the Facebook, Twitter, Reddit, YouTube, Pinterest, and Tumblr APIs
Stars: ✭ 240 (+224.32%)
Mutual labels:  tumblr, youtube, twitter, facebook
Rssbox
📰 I consume the world via RSS feeds, and this is my attempt to keep it that way.
Stars: ✭ 492 (+564.86%)
Mutual labels:  vimeo, youtube, twitter, instagram
Postwill
Posting to the most popular social media from Ruby
Stars: ✭ 181 (+144.59%)
Mutual labels:  tumblr, twitter, facebook, instagram
Keyring
Keyring is an authentication framework for WordPress. It comes with definitions for a variety of HTTP Basic, OAuth1 and OAuth2 web services. Use it as a common foundation for working with other web services from within WordPress code.
Stars: ✭ 52 (-29.73%)
Mutual labels:  youtube, twitter, facebook, instagram
Social ids
Get user ids from social network handlers
Stars: ✭ 9 (-87.84%)
Mutual labels:  twitter, facebook, instagram, social-network
Social Network Harvester V1.0
Stars: ✭ 5 (-93.24%)
Mutual labels:  youtube, twitter, facebook, social-network
Bash2mp4
Video Downloader for Termux .
Stars: ✭ 68 (-8.11%)
Mutual labels:  youtube, twitter, facebook, instagram
Socialbox Termux
SocialBox is a Bruteforce Attack Framework [ Facebook , Gmail , Instagram ,Twitter ] , Coded By Belahsan Ouerghi Edit By init__0 for termux on android
Stars: ✭ 324 (+337.84%)
Mutual labels:  twitter, facebook, instagram
Social Post Bundle
Symfony bundle to publish status updates on Facebook, LinkedIn and Twitter.
Stars: ✭ 35 (-52.7%)
Mutual labels:  twitter, facebook, social-network
Social Media Profiles Regexs
📇 Extract social media profiles and more with regular expressions
Stars: ✭ 324 (+337.84%)
Mutual labels:  twitter, facebook, instagram
Privacy Redirect
A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.
Stars: ✭ 342 (+362.16%)
Mutual labels:  youtube, twitter, instagram
Nemiro.oauth.dll
Nemiro.OAuth is a class library for authorization via OAuth protocol in .NET Framework
Stars: ✭ 45 (-39.19%)
Mutual labels:  twitter, facebook, instagram
Laravel Social Auto Posting
🌈Laravel social auto posting
Stars: ✭ 306 (+313.51%)
Mutual labels:  twitter, facebook, social-network
React Player
A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
Stars: ✭ 5,931 (+7914.86%)
Mutual labels:  vimeo, youtube, facebook
Holehe
holehe allows you to check if the mail is used on different sites like twitter, instagram and will retrieve information on sites with the forgotten password function.
Stars: ✭ 568 (+667.57%)
Mutual labels:  twitter, instagram, social-network

network-avatar-picker

A npm module that returns a user's avatar from his social networks as Buffer or as URL. You can choose among Facebook, Twitter, Instagram, Tumblr, Vimeo, Github, Gmail and Youtube provider. Then, you just need to pass a username without the need of token or API keys and retrieve user's social network profile picture!

npm version Build Status Coverage Status

Supported Providers

  • Facebook
  • Github
  • Gmail
  • Instagram
  • Tumblr
  • Twitter
  • Vimeo
  • Youtube

Getting Started

Installing

First, install network-avatar-picker as a dependency:

npm install --save network-avatar-picker

Usage

Basic configuration

You should require the dependency in order to be able use it:

const NetworkAvatarPicker = require('network-avatar-picker');
const avatarPicker = new NetworkAvatarPicker();

Cache configuration using Redis

In 1.4.0 we have introduced support to cache results with Redis! Just pass redis config as param to the NetworkAvatarPicker and it will create a new redis client. Then, we will store the images and avatar's URL to redis.

const NetworkAvatarPicker = require('network-avatar-picker');
const avatarPicker = new NetworkAvatarPicker({
  redis: {
    host: '127.0.0.1', // required
    port: '6379', // required
    password  : 'your password',    // optional: replace with your password
    ttl: 3600, // optional: Add your expiration caching time in seconds. Default value: 3600
  }
});

This way we create a local Redis client with expiration caching time 3600sec.

Methods

Use the async methods of the avatarPicker instance to fetch user avatars:

A) getAvatar: Fetch avatar image as Buffer

  • avatarPicker.facebook.getAvatar(username)
  • avatarPicker.twitter.getAvatar(username)
  • avatarPicker.instagram.getAvatar(username)
  • avatarPicker.tumblr.getAvatar(username)
  • avatarPicker.vimeo.getAvatar(username)
  • avatarPicker.github.getAvatar(username)
  • avatarPicker.youtube.getAvatar(username)
  • avatarPicker.gmail.getAvatar(email)

B) getAvatarUrl: Fetch avatar image as URL

  • avatarPicker.facebook.getAvatarUrl(username)
  • avatarPicker.twitter.getAvatarUrl(username)
  • avatarPicker.instagram.getAvatarUrl(username)
  • avatarPicker.tumblr.getAvatarUrl(username)
  • avatarPicker.vimeo.getAvatarUrl(username)
  • avatarPicker.github.getAvatarUrl(username)
  • avatarPicker.youtube.getAvatarUrl(username)
  • avatarPicker.gmail.getAvatarUrl(email)

Examples

  1. Fetch twitter's cnn user profile picture:

Buffer:

(async () => {
    try {
      const res = await avatarPicker.twitter.getAvatar('cnn');
    } catch (e) {
      // Deal with the fact the chain failed
    }
})();

URL:

(async () => {
    try {
      const res = await avatarPicker.twitter.getAvatarUrl('cnn');
    } catch (e) {
      // Deal with the fact the chain failed
    }
})();
  1. Fetch facebook's zuck user profile picture:

Buffer:

(async () => {
    try {
      const res = await avatarPicker.facebook.getAvatar('zuck');
    } catch (e) {
      // Deal with the fact the chain failed
    }
})();

URL:

(async () => {
    try {
      const res = await avatarPicker.facebook.getAvatarUrl('zuck');
    } catch (e) {
      // Deal with the fact the chain failed
    }
})();
  1. Fetch instagram's cnn user profile picture:

Buffer:

(async () => {
    try {
      const res = await avatarPicker.instagram.getAvatar('cnn');
    } catch (e) {
      // Deal with the fact the chain failed
    }
})();

URL:

(async () => {
    try {
      const res = await avatarPicker.instagram.getAvatarUrl('cnn');
    } catch (e) {
      // Deal with the fact the chain failed
    }
})();

Running the tests

In order to run tests you have to run:

npm run tests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].