Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
social-network-detector
Advanced tools
Readme
This library allows you to define a social platform by URI.
The library accepts http/https protocol (also mobile application protocols like android-app://
). So all these URIs will detected as facebook
This module is designed to be used using either browserify or Node.js it's released in the public npm registry and can be installed using:
npm install social-network-detector
Use the getNetworksList
method to get a list of all supported platforms
var socialNetworkDetector = require('./src/social-network-detector');
socialNetworkDetector.getNetworksList();
/*
* Will return a similar array
* [
* 'facebook', 'twitter', 'linkedin', 'reddit', 'vkontakte', 'pinterest', 'tumblr', 'telegram',
* 'snapchat', 'slack', 'youtube', 'whatsapp', 'wechat', 'instagram', 'qq', 'tiktok', 'medium',
* 'quora', 'weibo', 'twitch', 'discord', 'anchor', 'angellist', 'behance', 'clubhouse', 'devdotto',
* 'dribbble', 'github', 'onlyfans', 'producthunt', 'spotify', 'substack', 'wikipedia',
* ]
*/
Here are some examples of the library in action
var socialNetworkDetector = require('social-network-detector');
socialNetworkDetector.detect('https://staticxx.facebook.com/platform/'); // facebook
socialNetworkDetector.detect('android-app://com.linkedin.android'); // linkedin
socialNetworkDetector.detect('https://twitter.com/abyandaniel/status/1371762841066348544?s=20'); // twitter
socialNetworkDetector.detect('https://google.com/'); // null, since this is not a social platform
socialNetworkDetector.detect('https://newsstand.joomag.com/en/'); // null, since this is not a social platform
socialNetworkDetector.detect('https://t.co/Jyx44u722z?amp=1'); // twitter
MIT
FAQs
This library allows you to define a social platform by URI.
The npm package social-network-detector receives a total of 86 weekly downloads. As such, social-network-detector popularity was classified as not popular.
We found that social-network-detector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.