https://github.com/datalux/ffid
Find Facebook ID: a shell command to find user's Facebook ID.
https://github.com/datalux/ffid
Last synced: 2 months ago
JSON representation
Find Facebook ID: a shell command to find user's Facebook ID.
- Host: GitHub
- URL: https://github.com/datalux/ffid
- Owner: Datalux
- Created: 2020-01-03T19:21:57.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-03T20:18:21.000Z (about 6 years ago)
- Last Synced: 2025-01-14T23:02:54.110Z (12 months ago)
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ffid
Find Facebook ID: a shell command to find user's Facebook ID.
# Installation
Create or edit the RC File of your shell (`~/.bashrc` if you use Bash or `~/.zshrc` if you use ZSH) (_for MAC users edit `~/.bash_profile` file instead `~/.bashrc`._ file) and append the following code:
```bash
ffid() {
if [ -z "$@" ]
then
>&2 echo "ffid: no nickname specified!"
else
cmd=$(curl -s https://www.facebook.com/${@} | grep -o 'entity_id[^[:blank:]]*' | awk -F':' '{print $2}' | awk -F '}' '{print $1}')
if [[ -n $cmd ]]; then
echo "$cmd"
else
>&2 echo "ffid: invalid nickname. Usage: ffid "
fi
fi
}
alias ffid=ffid
```
Now restare your terminal.
# Usage
Just run:
`$ ffid `