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

facebook-unofficial-api

v1.0.2

Published

This library is written in TypeScript for Node.JS and allows you to perform various operations using the Facebook API.

Downloads

2

Readme

Facebook Unofficial API

Available Languages: 🇺🇸 🇹🇷

Facebook is one of the world's most popular social media platforms with billions of users.

For businesses, brands and individuals, Facebook offers opportunities to reach large audiences, increase brand awareness and engage with target audiences. However, driving and managing these interactions can sometimes be complex.

This is where the new Unofficial Facebook API we developed with TypeScript comes in.

This library makes it easier to manage your interactions on Facebook and allows businesses or developers to operate more effectively on the Facebook platform.

Introduction to Facebook Library

This library is written in TypeScript for Node.JS and allows you to perform various operations using the Facebook API. Here are some of the features this library provides:

  • Login: Users can easily log in to their Facebook account using the library. This simplifies the login process and provides a faster start.

  • Page Like: Businesses or users can use this function to grow their pages and attract more followers. Page liking can be done with a single function call..

  • Post Like: Users can like other users statuses. This is an effective way to increase engagement and build connections between users.

  • Commenting on a post: Businesses or individuals can enable users to comment on the posts they publish. This is a way to get more engagement and make the content reach a wider audience.

This library allows you to effectively operate on the Facebook platform using the power of Node.js. It is also easy to use and reduces the complexity required to manage Facebook Unofficial API calls.

Getting Started

To start the development process, make sure you have Node.js installed on your system. You can download it from the official Node.js website or use a package manager like npm (Node Package Manager) to install it.

Installation

$ npm i facebook-unofficial-api
$ bun i facebook-unofficial-api
$ pnpm i facebook-unofficial-api

How to import

const { Facebook } = require('facebook-unofficial-api');

Login with Facebook

async function loginRequest() {
 const facebookInstance = new Facebook();
 const Username = 'Your Facebook Mail or Username';
 const Password = 'Your Facebook Password';

// If you want to use a proxy -> facebookInstance.fProxy = 'http://proxy_username:proxy_password@proxy_ip:proxy_port'

facebookInstance.loginRequest(Username, Password).then((response) => {
console.log(response);
}).catch((err) => {
console.log(err);
});
} loginRequest()

Pull User Information

async function checkUserDetails(){
const UUID = 'Facebook UUID -> You can get it from the login process';
const Token = 'Facebook Token -> You can get it from the login process';

// If you want to use a proxy -> facebookInstance.fProxy = 'http://proxy_username:proxy_password@proxy_ip:proxy_port'

facebookInstance.checkUserDetails(UUID,Token).then((response) => {
console.log(response);
}).catch((err) => {
console.log(err);
})
}checkUserDetails()

Post & Page Like

const Token = 'Facebook Token -> You can get it from the login process';
const postID = 'pfbid027yBu3CAGH1f1mUPom2peRFdDpfWWZJaQy5obBojJobc4dYhuyY144maebMVnRCsBl';

// If you want to use a proxy -> facebookInstance.fProxy = 'http://proxy_username:proxy_password@proxy_ip:proxy_port'

facebookInstance.sendLike(postID, Token).then((response) => {
console.log(response);
}).catch((err) => {
console.log(err);
});

Send Comment

const Token = 'Facebook Token -> You can get it from the login process';
const postID = 'pfbid027yBu3CAGH1f1mUPom2peRFdDpfWWZJaQy5obBojJobc4dYhuyY144maebMVnRCsBl';
const Message = 'Comment';

// If you want to use a proxy -> facebookInstance.fProxy = 'http://proxy_username:proxy_password@proxy_ip:proxy_port'

facebookInstance.sendComment(postID, Token, Message).then((result) => {
console.log(result);
}).catch((err) => {
console.log(err);
});

Keywords

Facebook, Facebook API, Facebook Unofficial API, Unofficial Facebook API, NodeJS Developer, Back-end Developer, Node.JS Developer, Backend Developer

Sponsor & Donate

Patreon | BuyMeaCoffee

Copyright & Other Issues

Copyright: [email protected] | Other Issues: [email protected]

Social Media

Linkedin | Twitter | Bluesky | Instagram | Youtube | Github | Npmjs

License

Can Yesilyurt | cy4udev