Skip to content

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

License

Notifications You must be signed in to change notification settings

cy4udev/Facebook-Unofficial-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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, facebook api for developers, facebook api meaning, facebook api hide comment, facebook api get user info, facebook api configuration, facebook api instagram insights, facebook api delete post, facebook api app, facebook jobs api, facebook api graph explorer, facebook api error code 100, facebook api block user, facebook api for whatsapp, facebook api changes, facebook api integration, facebook api down, facebook api access token, facebook api java, facebook api error codes, facebook api an unknown error occurred, facebook api key, facebook api get posts, facebook api free, facebook api breakdowns, facebook api health check, facebook api for research, facebook api javascript, facebook api typescript, facebook api nodejs, facebook api instagram_business_account, facebook api data, facebook api adset, facebook api javascript example, facebook api typescript example, facebook api nodejs example, facebook api get comments from post, facebook api example, facebook api business_management, facebook api for groups, facebook api changelog, api facebook help, facebook api developer, facebook api explorer, facebook api ad account, facebook post api javascript, facebook post api typescript, facebook post api nodejs, facebook api events list, facebook api bubble, facebook api health status, facebook api fields, facebook api create post, facebook api id, facebook api date_preset, facebook api accounts, facebook api java library, facebook api key create, facebook api get group posts, facebook api error, facebook api bugs, facebook api feed, facebook api conversions, facebook api header, facebook api graph, [facebook api documentation](https://www.cy4u.dev/Facebook-Unofficial-API/ ""facebook api documentation), facebook api insights metrics, facebook api download video, facebook api access token expiration, facebook share api javascript, facebook share api typescript, facebook share api nodejs, facebook api enroll_status, facebook api bot, facebook api hashtag search, facebook api friends list, facebook api campaign, facebook api issues, facebook api debugger, facebook api authentication, facebook api json, facebook api github, facebook api endpoints, facebook api batch request, facebook api key and secret, facebook api for posts, facebook api cost, facebook api html, facebook api get posts from page, facebook api create event, facebook api instagram, facebook api download, facebook api ad creative, facebook javascript api tutorial, facebook typescript api tutorial, facebook nodejs api tutorial, facebook api birthdays, facebook api generate access token, facebook api error_subcode 33, facebook api for ads, facebook api comments, facebook api insights, facebook api deprecation, facebook api ads, facebook api events, facebook api business_management permission, facebook api key for facebook login, facebook api get pages list, NodeJS Developer, Back-end Developer, Node.JS Developer, Backend Developer

Sponsor & Donate

Github | Patreon | BuyMeaCoffee

Copyright & Other Issues

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

Social Media

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

License

Can Yesilyurt | cy4udev