Skip to content

aestetype/find-facebook-id

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

find-facebook-id

npm version CircleCI

Find a facebook id given a Facebook name.

Support:

  • users
  • pages
  • groups (You will need a valid facebook access token)

Install

yarn add find-facebook-id
npm i --save find-facebook-id

Usage

import findFacebookId from 'find-facebook-id';

// Find facebook id return a promise

const id = await findFacebookId('zuck');

findFacebookId('zuck').then((id) => {
  console.log(`facebook id of zuck is: ${id}`);
}).catch((err) => {
  console.log(err);
});

// To query a group you must pass a valid facebook access token
findFacebookId('groupsatopenuniversity', facebookAccessToken).then((id) => {
  console.log(`facebook id of groupsatopenuniversity is: ${id}`);
}).catch((err) => {
  console.log(err);
});

Cli

Install:

yarn global add find-facebook-id
npm i -g find-facebook-id

Usage:

$ find-facebook-id <username/pagename>
$ find-facebook-id <groupname> <facebook-access-token>

About

Find a facebook id given a facebook name

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%