https://github.com/pradel/find-facebook-id
Find a facebook id given a facebook name
https://github.com/pradel/find-facebook-id
cli facebook facebook-id
Last synced: about 1 year ago
JSON representation
Find a facebook id given a facebook name
- Host: GitHub
- URL: https://github.com/pradel/find-facebook-id
- Owner: pradel
- License: mit
- Created: 2017-04-12T12:35:50.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-12T15:35:12.000Z (about 9 years ago)
- Last Synced: 2025-03-28T18:11:27.982Z (over 1 year ago)
- Topics: cli, facebook, facebook-id
- Language: JavaScript
- Homepage:
- Size: 40 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# find-facebook-id
[](https://badge.fury.io/js/find-facebook-id)
[](https://circleci.com/gh/pradel/find-facebook-id)
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
```javascript
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
$ find-facebook-id
```